Starting the UniK daemon with unik daemon
requires a yaml
file with configuration for each desired provider.
By default, unik daemon
reads from a configuration file located at $HOME/.unik/daemon-config.yaml
. We recommend placing your config file there. However, you can specify a different config file with unik daemon --f <path-to-file>
.
UniK requires valid yaml
matching the following example:
providers:
aws:
- name: aws-1
region: us-west-1
zone: us-west-1a
vsphere:
- name: vsphere-1
vsphere_user: user
vsphere_password: password
vsphere_url: url
datastore: datastore1
datacenter: ha-datacenter
network: VM Network
virtualbox:
- name: my-vbox
adapter_name: vboxnet0
adapter_type: host_only
version: 0.0.0
Include the provider stub for any provider you wish to use. For example, to use only Virtualbox, your daemon-config.yaml
should look like this.
providers:
virtualbox:
- name: my_virtualbox_provider
adapter_type: host_only
adapter_name: vboxnet0
If using both AWS and vSphere, the file should look like so:
providers:
aws:
- name: aws-1
region: us-west-1
zone: us-west-1a
vsphere:
- name: vsphere-1
vsphere_user: user
vsphere_password: password
vsphere_url: url
datastore: datastore1
datacenter: ha-datacenter
network: VM Network
To run on virtualbox, you will need to tell UniK what type of network card to attach to instances. Available options are host_only
for Host-Only Networking, or bridged
for Bridged Networking. UniK must also know the name of the network adapter to use. These are the only properties that virtualbox provider requires. (name
field is not used currently).
In the Virtualbox stub:
virtualbox:
- name: any-name-you-want
adapter_type: ADAPTER_TYPE
adapter_name: ADAPTER_NAME
- Set
ADAPTER_TYPE
tohost_only
orbridged
- Set
ADAPTER_NAME
to the name of the adapter. If usinghost_only
, you may need to create a HostOnly network in Virtualbox.
AWS provider in UniK assumes use of default AWS credential chain. This means either setting AWS access key id and secret key in your environment, or using the default AWS configuration file.
Region and zone should be specified like so in the AWS stub:
aws:
- name: any-name-you-want
region: us-west-1
zone: us-west-1a
vSphere provider requires vSphere username, password, url (in the format http://host_url
or https://host_url
), as well as the name of the datacenter and datastore to use for vmdk storage.
network
is optional; use it to specify the label of the vSphere network to attach vSphere instances to. If left empty, UniK will attempt to use the default network ('VM Network').
vsphere:
- name: any-name-you-want
vsphere_user: user
vsphere_password: password
vsphere_url: url
datastore: datastore1
datacenter: ha-datacenter
network: VM Network
After the daemon is running, you can target it through the CLI. To target the daemon, run unik target --host <host_url>
where host_url
is the url of the host running the daemon. If running the host on your local machine, you can just use unik target --host localhost