- Get an authentication token from the Orka3 CLI.
- List your nodes and check their state in the response.
- List the available VMs with the API.
- Deploy your first VM instance.
- Run Apple Screen Sharing to connect to the VM instance. Use
vnc://<VM-IP>:<Screenshare-port>with the IP and port from the deploy response from Step 4. Use theadmin/admincredentials. - Once you login be sure to change the login credentials, apply the latest OS updates, and install (or upgrade) the Orka VM Tools for added security and functionality.
- Commit or save the changes to a new base image (use the VM name from Step 4).
- Deploy another VM instance.
- Run Apple Screen Sharing and connect to the newly deployed VM. Use the connection information returned in Step 8.
- Delete your VM instances.
- List your VMs.
- Advanced users
- Users with workflows that require automation
Before you begin
- Make sure you can access the account for your cluster in the MacStadium Customer Portal. See Cluster Access Management: Overview.
- Get your VPN connection information from your IP Plan. You can download it from the MacStadium portal.
- Connect to your Orka cluster via VPN.
- Download and install a VPN client. Note that if you’re using a custom Orka domain, you might need to make some additional configuration changes.
- Use the server address and credentials from the VPN section at the top of your IP Plan.
Some Orka3 API basics
- You need to target your Orka API URL in your API calls.
- You need to provide the
Authorization: Bearer <TOKEN>header in your API calls.
What’s your Orka API URL?
You can get your Orka API URL from your IP Plan:- For clusters deployed before Orka 2.1, it’s the
.100address for yourPrivate-1network (usually,10.221.188.100), prefixed withhttp. For example:http://10.221.188.100. - For clusters deployed with Orka 2.1 or later, it’s the
.20address for yourPrivate-1network (usually10.221.188.20). prefixed withhttp. For example:http://10.221.188.20. - You can also use
https://<orka-domain>andhttps://<custom-domain>(if configured). To get the Orka domain for your Orka cluster, contact MacStadium. To use an external custom domain, see here.
http://<orka-IP>, https://<orka-domain>, and https://<custom-domain> interchangeably in your workflows.
- The Orka3 API is a RESTful API and conforms to enterprise industry standards.
- The complete API reference is available here.
Change the Orka API URL (
http://10.221.188.100, http://10.221.188.20, your Orka domain, or your external custom domain), the token, the license key, and any other placeholders as needed to reflect your environment.
All sample responses are piped through a JSON formatting service. Your responses may look different.
Get a token from the Orka3 CLI
For all API calls, you need to provide theAuthorization: Bearer <TOKEN> header. The Orka3 API currently does not let you log in from it directly and obtain a token. You will need to obtain your token from the Orka3 CLI.
Orka lets you log in with your MacStadium Customer Portal credentials. Based on the role configured in the Customer Portal, you will have administrative or regular user privileges. By default, you will have access to the orka-default namespace. If you have been added to additional role bindings, you might be able to access additional namespaces.
orka3 commands. Your token is stored locally in the ~/.kube/config file. Note that your token has a validity duration of one hour. Afterward, you must obtain and pass a new token in your CLI or API calls.
You now need to get your Orka authentication token from your ~/.kube/config:
Deploy your first VM instance
Starting with Orka 3.0.0, you can use the built-in Swagger UI to execute API calls directly against your cluster. In your browser, navigate to<ORKA_API_URL>/api/v1/swagger, click AUthorize , and type Bearer <TOKEN>. For every call that you want to run, just click Try it out and fill the required details.
- Check the available resources in your cluster:
- Check if there are any VMs on your environment.
orka-default namespace. If nothing prints, no one has created any VM instances yet.
- List the available base images that you can use to deploy a VM.
sonoma-90gb-orka3-arm item in the response. It is a fully installed and configured macOS Sonoma image with a 90GB disk size. It also has an admin user configured and SSH and Apple Screen Sharing access enabled.
Glossary: Image
A disk image that represents VM storage. Base images are bootable disk images that provide the OS, file system, and storage for your VM configs and VMs.
(Intel-only) Empty images provide added storage or serve as the base image during manual OS installs from ISO.
- Deploying a VM is as simple as just specifying a base image. Run:
image.
Orka creates a simple VM with the specified image and 3 CPU, and assigns a randomly generated name to it.
Starting with Orka 3.0.0, you can deploy VMs using images from OCI-compatible registries.
So, instead of using the sonoma-90gb-orka3-arm image, you can use our latest Sonoma image from GitHub packages.
cURL
- What happens if you list your VMs again now?
GET /resources/vm/list call is powerful. It shows a lot of system information for the VM, along with its IP, and several connection ports. Note that even though Screenshare and SSH are always listed and configured for every VM, you won’t be able to use them unless the respective connection type is enabled in the macOS as well. This behavior is a security limitation of the OS.
In a pool of many VMs, are you looking for that special one?
When you have a lot of VMs, the response of GET /resources/vm/list might become too crowded to use efficiently. Run GET /namespaces/orka-default/vms/<VM_NAME> instead and get the system information for a single VM.
- Check your nodes to see how many resources are now in use.
Experience your VM instance
- Look at the last output of
GET /namespaces/orka-default/vmsagain. Get that IP andscreenshareport. - Launch Apple Screen Sharing on your local machine. In Connect To: , type
vnc://<VM-IP>:<Screenshare-port>.
<VM-IP>:<VNC-port>.
One more thing to remember is that Screen Sharing needs to be already enabled on the macOS. Most of the time, this is not the case (especially on clean OS installs or after an ISO install (Intel Workloads Only)), and you will need to enable the setting yourself.
The good news is that sonoma-90gb-orka3-arm is already preconfigured for you, and you can enjoy out-of-the-box Screen Sharing and SSH connectivity.
Are you not using the official Sonoma images?
If you’re using another image as your starting point or if you are installing your OS from ISO, you will likely not have SSH or Screen Sharing enabled by default (even though the respective ports will be mapped by default). In this case, you need to connect to the VM via VNC. You can then enable SSH and Screen Sharing connectivity in the OS.
-
When prompted by Apple Screen Sharing, provide the credentials for the VM (
admin/admin). You will be prompted for the password one more time - when Apple connects to the VM. -
On the VM, launch System Preferences > Users & Groups. Select the Admin user and click Change password. Set the
Adminuser password to whatever works for you. - (Optional) Inside the VM, launch the Terminal application and run the following command.
- Always apply the latest OS updates and restart the VM.
Preserve the image changes
Changing a running VM’s configuration or file system does not affect its base image. As soon as you delete the VM, your changes will be lost, and you will need to recreate them manually on other VMs. To create changes that stick and appear on future deployments, you can commit your changes to the base image, save the changes as a new image, or push your changes to an OCI-compatible registry. Glossary: Commit changesCommit modifies the original base image of the respective VM instance. With this operation, you apply the current state of a VM instance over the base image of its VM config. This way, newly deployed instances will launch in the same state as your current VM.
This operation restarts the VM.
Glossary: Save changes
Save creates a new base image from the current state of the respective VM instance. To use it, you need to create a new VM config that references the new base image.
This operation restarts the VM.
Glossary: Push changes
Push your changes to the specified OCI-compatible registry, image, and image tag. Registry credentials are required to push an image.
Return to the command line on your local machine and run the following command. You can get the <VM_NAME> from the GET /namespaces/orka-default/vms output you ran earlier.
cURL
- See how the changes are preserved for yourself. Deploy a new VM instance from your image:
- Launch Apple Screen Sharing and connect to the newly deployed VM instance. Use the updated admin credentials to log in.
Time to say goodbye
When your VM instances have served their purpose, you candelete them.
- Remove the VM instances you created until now:
- List your VMs again.