Welcome! This tutorial will guide you through setting up your Anka Build Cloud.
You can complete this tutorial with only one machine running Mac OS, but it's not recommended.
Perform the following steps on the machines you intend to be Nodes. “Nodes” are the host machines you want to run the Anka VMs. You can use any Apple hardware for this.
You can find the various Anka Build packages on the Anka Build download page. You can use the guided installer by launching the .pkg, or install from your terminal.
curl -L -o Anka.pkg https://veertu.com/downloads/ankabuild-latest
sudo installer -pkg Anka.pkg -tgt /
Or, if you need nested virtualization to run Docker inside of the VM:
You can find Nested Virtualization inside of the Custom Install section of the guided installer. You can get there using the
Customize
button on the Installation Type stage.
We currently only support Docker within Nested Virtualization
sudo installer -applyChoiceChangesXML nanka.xml -pkg Ankaxx.pkg -target /
You'll need modify your Anka VM Template and Tags with
anka modify name set nested 1
anka version
Anka Build Basic version 2.1.2 (build 112)
.sudo anka license activate <key>
For Anka CLI commands and options, see the Command Reference.
There are multiple ways to obtain the installer .app file for Mac OSX that we'll detail for you below:
If you have a pending upgrade to the next minor or patch version of Mac OS:
Preferences -> Software Update -> Advanced
, make sure Download new updates when available
is checked but Install macOS updates
is not. While you're still within Software Update
, click Update Now
but do not install the next version (Restart) until after you've created the Anka VM or the Install .app under /Applications will be deleted.sudo softwareupdate --fetch-full-installer --full-installer-version 10.15.4
to download the installer.On any Mac OS version you can use the installinstallmacos.py script (requires python):
Download and run the script:
curl --fail --silent -L -O https://raw.githubusercontent.com/munki/macadmin-scripts/master/installinstallmacos.py
sudo chmod +x installinstallmacos.py
sudo ./installinstallmacos.py --raw
The script downloads an image to the location of the .py script, so further steps are necessary to create an Anka VM:
mkdir -p /tmp/app
hdiutil attach "<installinstallmacos.py image path>" -mountpoint /tmp/app
cp -r "/tmp/app/Applications/Install Mac OS Mojave.app" /Applications/
hdiutil detach /tmp/app -force
rm -f "<installinstallmacos.py image path>"
Have your local IT department provide a network volume or download links.
sudo anka create --app /Applications/Install\ macOS\ Catalina.app/ 10.15.4
We recommend adding a version to the Template name so it's clear what version of OSX it is.
The VM creation should take around 30 minutes.
You can find detailed instructions for
anka create
here.
You can continue on to Step 2 while you wait for this to finish.
Perform the following steps on the machine intended to run the Controller & Registry.
Download the file called “Cloud Controller & Registry (Run on Mac)” from Anka Build Download page. If you are more comfortable with the command line, you can download the file with curl:
curl -S -L -o ~/Downloads/AnkaControllerRegistry.pkg https://veertu.com/downloads/ankacontroller-registry-mac-latest
Double click on the .pkg to start the UI install process.
sudo installer -pkg ~/Downloads/AnkaControllerRegistry.pkg -target /
Two methods are available:
sudo anka-controller status
curl http://<ip>:8080/api/v1/status
Anka Controller should be listening on port 80 (HTTP). Try pointing your browser to the machine's IP or hostname. You can use localhost
or 127.0.0.1
if you're on the Controller machine.
Your new dashboard should look like the picture below
Let's take a look at what is now running on your machine:
The Anka Controller AND Registry command is installed into /usr/local/bin/anka-controller
. To see what functions it has, execute the script with root privileges:
sudo anka-controller
usage: /usr/local/bin/anka-controller [start|stop|restart|status|logs]
When sudo anka-controller start
is executed, the script will use launchd
to load the daemon: /Library/LaunchDaemons/com.veertu.anka.controller.plist
.
/usr/local/bin/anka-controllerd
. This file acts as a run script and configuration file. You can modify it to change the default ports used by adding the proper option or ENV. For example, if you want to run the Registry on a different port and use 127.0.0.1, you would add the following above the "$CONTROLLER_BIN"
line (reference):export ANKA_ANKA_REGISTRY="http://127.0.0.1:8081"
export ANKA_REGISTRY_LISTEN_ADDRESS=":8081"
Logs are written to /Library/Logs/Veertu/AnkaController
by default:
/Library/Logs/Veertu/AnkaController/anka-controller.INFO
/Library/Logs/Veertu/AnkaController/anka-controller.WARNING
/Library/Logs/Veertu/AnkaController/anka-controller.ERROR
You can modify the destination in the
/usr/local/bin/anka-controllerd
file (reference).
You can also watch the logs live (similar to tail -f):
sudo anka-controller logs
The log level can be modified from the default 0 value. The higher the number, the more verbose the logging. (reference)
Great! Now that we have our Anka Controller & Registry up and running, let's add Nodes!
Perform the following steps on the Node where you created your first VM Template.
We now need to configure the Registry on this machine so we can push/upload the local VM Template we created earlier. Uploading the Template to the Registry makes it possible to download and run it from other nodes.
Assuming you haven't changed the default port configuration, your Registry is serving requests on port 8089
.
sudo anka registry add <registry name here> http://<ip>:8089
Verify the configuration:
sudo anka registry list-repos
++
++
<registry name you set> (default)
+--------+------------------+
| host | <the ip you set> |
+--------+------------------+
| scheme | http |
+--------+------------------+
| port | 8089 |
+--------+------------------+
Then, confirm the registry list command doesn't throw any failures:
sudo anka registry list
sudo anka registry push catalina -t base
After the push completes, you should see your new Template in the “Templates” section of the controller UI.
sudo ankacluster join http://<ip>
Password:
Testing connection to controller...: Ok
Testing connection to the registry...: Ok
Ok
Cluster join success
<ip>
with the IP of the machine hosting your controller:The command may hang for a few moments and then display Cluster join success
. Please report any errors you find to support@veertu.com.
Go to your Controller dashboard and click on the Instances tab:
Click on Create Instance(s), and the Create New Instances view displays:
Select the VM Template and click Start. The Create New Instances view closes and returns you to the Instances view. You should now see the Instance in a Scheduling or Pulling State:
After the Scheduling and Pulling finishes, the VM starts on one of the Nodes and shows a Started State in the Controller UI:
You can now confirm the Instance is running from inside the Node:
anka --machine-readable
sudo anka --machine-readable list | jq
{
"status": "OK",
"body": [
{
"status": "suspended",
"name": "catalina",
"stop_date": "2020-04-01T21:30:59.798697Z",
"creation_date": "2020-04-01T00:00:13.656296Z",
"version": "base",
"uuid": "10c720eb-dcce-46f7-baa3-28bacef0ec0f"
},
{
"status": "running",
"name": "mgmtManaged-catalina-1585776660490226000",
"stop_date": "2020-04-01T21:36:11.742662Z",
"creation_date": "2020-04-01T21:31:01.055250Z",
"version": "",
"uuid": "dcbeb319-421a-4d30-8466-194eb7fa5f75"
}
],
"message": ""
}
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.