Getting Started with Veertu Anka Cloud

MacStadium has partnered with Veertu to provide a turn-key Veertu Anka Cloud solution powered by MacStadium infrastructure. If you’ve decided to sign up for an Anka Cloud of any size and variation, it will be setup and ready for you to create a macOS VM.

Your Anka Cloud will come pre-configured, which means that the Macs in your Anka Cloud cluster already joined the Anka Controller, and the Anka Registry is setup so that you can create, push and distribute your macOS image to all nodes in the cluster.

Our datacenter staff will assemble all parts of your Anka Cloud, configure networking in a standardized way, and document all parts of your cloud in an IP plan. This IP plan will include all the information needed for you to connect to your firewall through VPN, Anka Controller and Macs.

Once you have successfully established a VPN connection to your firewall, we recommend that you try to access your Anka Cloud command and control center, the Anka Controller, through its web UI. You can find its IP address in your IP Plan.

Anka Cloud Dashboard

In the Anka Controllers overview you can see general information about your Anka Cloud, like how many Anka instances (VMs) are currently running across all nodes in your cluster or how much space there is left for VM images in your Anka Registry. Once you’re able to access your Anka Controllers web UI, we recommend that you get an overview of all the Macs connected to your Anka Controller by clicking on “Nodes” in the left hand menu.

Anka Cloud nodes

To get started with your Anka Cloud you’ll have to create a VM image which will be first copied to your Anka Registry and later to all the nodes in your cluster on your command. It can then be used to spin up new instances on demand of that versioned VM image across your cluster. Pick one of your Macs in the cluster to build your initial macOS VM. If you have a mixed hardware cluster we recommend picking the most powerful machine for this task since the creation will install macOS into the VM image and set it up with an user account and password. The less powerful the machine, the longer it will take.

In order to connect to your chosen Mac node you can either use Apple’s Remote Desktop Mac app or simply enter vnc://ip-of-your-mac-node into your browser. Login information (user account name and password) for your Mac nodes can be found in your IP plan. Once connected to the Mac that you’ll use to build your image, open the Mac App Store and download the latest version of macOS. In this example the Install macOS High in the /Applications folder is needed by Anka in order to create the macOS VM image.

macOS VM

Once the download finishes you can either open the through the VNC connection that you’re already using, or if your internet connection isn’t fast enough, you can also close your VNC window and execute the same commands by connection to the same host through SSH.

$ ssh administrator@ip-of-your-mac-node

You can then create your first Anka VM by using:

$ anka create --ram-size 4G --cpu-count 2 -app /Applications/Install\ macOS\ High\ MS-HighSierra

This will create an Anka macOS VM with 4GB of virtual RAM available to it and two virtual CPUs. For image creation it may be useful to assign as many virtual CPUs and RAM as you desire in order to speed up the installation process. Be aware that you have to completely turn off your VM and modify its allocated resources before pushing it to your Anka Registry. Otherwise, you may not be able to use your Anka Cloud to its fullest potential.

The process of creating the VM may take a while (up to 20-30 minutes depending on what hardware you’re using). Once the installation process finishes you can start your Anka VM with:

$ anka start MS-HighSierra

The Anka start command should output information that allows you to directly connect to your VM in order to install all your dependencies like Xcode, Homebrew, Carthage or any other dependencies that your build process requires. After you’ve setup your VM and configured everything to your required specifications, don’t shut it off but rather suspend it in order to boot more quickly later on:

$ anka suspend MS-HighSierra

Once the VM is suspended you’ll be able to push it to your registry and assign it with a version tag:

$ anka registry push MS-HighSierra v1

The versioning allows you to run multiple macOS, Xcode or other dependency versions painlessly throughout your Anka Cloud cluster. This way you’ll be able to mix and match as required by your workflow without having to painlessly shut down, compress VM directories, and manually archive them somewhere for later use. All of this is built into Anka and is handled by the Anka Registry.

If everything shows up the way you expect it to in your Anka Controllers Templates overview, you can start distributing it to all your Mac nodes in your cluster by selecting the image you just created and selecting “Distribute To All Nodes.”

Depending on various variables like your Anka Cloud variant, firewall maximum throughput, and VM image size, this may take a while to finish.

After the distribution to all nodes has finished you can start up new ones by selecting “Instances” in the menu. Select “Create Instance(s),” pick the template (VM image) you’d like to use, the desired version tag, how many instances, and ,if desired, which node (Mac) should be used to start this instance.

Anka Instance

Your Anka Cloud is now entirely setup and ready to be used by a CI/CD workflow.

Useful links: