Opendc is a new project and as such is still considered experimental. Testing has been conducted using the Vagrant, Digital Ocean and Bare Providers using only a limited set of environments.
The following software versions are known to work.
- macOS 10.12, CentOS 7. For the client / host node.
- Python 2.7.11, 2.7.12.
- Ansible 188.8.131.52.
- Vagrant 1.8.7.
- Virtualbox 5.1.8.
- dopy 0.3.7. For interacting with Digital Ocean.
- The following install instructions relate to using the Vagrant Provider.
- The master node will be assigned 2GB RAM.
- Three worker nodes will be created with 3GB RAM each.
Install the opendc command
opendc command is implemented using Python. It can be installed using
$ pip install opendc
The following dependancies will also be installed along with
ansible==184.108.40.206 docopt>=0.6.2 Jinja2>=2.8 pprintpp>=0.2.3
Ansible will install a number of its own dependancies.
Getting help for the opendc command
opendc command provides help information at the top level and for each subcommand.
$ opendc -h Interact with opendc. usage: opendc [--help | -h] [--version] [--debug] <command> [<args>...] options: -h, --help show this help. --version show the version. --debug show debug output. commands: init initialize a new opendc installation in the current directory. up run template, machine, provision, client, config, pull, and helm commands. template create provider specific files from templates. machine create a new set of machines for opendc to be provisioned to. provision provision opendc components on to the machines. client install kubectl and helm clients locally. config generate a local kubeconfig file. pull pull opendc solution images to the Docker repository cache. helm deploy Helm to the k8s cluster. sol deploy opendc solutions to the k8s cluster. hosts update the local /etc/hosts with opendc hosts and services. security manage opendc security, i.e. ssh config, certificates, tokens, etc. [NOT IMPLEMENTED] upgrade upgrade playbooks. [NOT IMPLEMENTED] start start opendc machines. [NOT IMPLEMENTED] status check status of services. [NOT IMPLEMENTED] stop stop opendc machines. [NOT IMPLEMENTED] destroy remove opendc machines. [NOT IMPLEMENTED] environment variables: opendc_SHOW_STACK=False show full stack of any caught exceptions. [NOT IMPLEMENTED] examples: opendc init --provider vagrant opendc up opendc status
$ opendc sol -h Deploy opendc solutions to the k8s cluster. usage: opendc [--debug] sol [<solution>] [--help | -h] options: <solution> is a specific solution to deploy. -h, --help show this help. --debug show debug output. example: opendc sol opendc sol cs1_cluster_services
Before installing opendc, a directory needs to be initialised with the files for a particular Provider. The following example uses the Vagrant Provider.
$ mkdir ~/opendc $ cd ~/opendc $ opendc init -p vagrant
To use the Vagrant Provider the following software versions must be installed.
- Vagrant 1.8.7
- Virtualbox 5.1.8 and above
Edit the provider.yaml file
If you wish to change the install defaults then you can review and edit the
provider.yaml file that has been created in the install root directory.
Generate public / private key pair for admin user
You can generate your own public / private key pair for the admin user or make use of the sample ones provided. The key pair can be found in the
keys/ directory of the install root.
Install the base components
The simplest way to install the opendc base components is by using
$ opendc up
opendc up subcommand will chain together the
helm subcommands into a single run. Each of these subcommands can be run individually if desired.
- The default installation directory for the
helmcommands is in the
bin/directory of the install root.
- The initial install will take some time as the Solution images are also pulled so that the Solutions can be installed much faster.
Validate the install
opendc up has completed you should have a working installation of the opendc base components. To test this use the following commands.
$ source bin/opendc_env.sh $ kubectl get nodes
You should see a set of Kubernetes nodes, i.e.
NAME STATUS AGE node1.vb.opendc.io Ready 5m node2.vb.opendc.io Ready 5m node3.vb.opendc.io Ready 5m
Install the Solutions
Once the opendc base components are installed the Solutions can be installed.
$ opendc sol
Currently the following Solutions will be installed.
- (cs1) Cluster Services
- (cm1) Cluster Management
- (dbs1) Distributed Block Storage
- (im1) Identity Management
- (hrp1) HTTP/S Reverse Proxy
- (m1) Metrics
- (l1) Logging
- (ir1) Image Registry
- (jm1) Job Management
Modify the local hosts file
Once the opendc Solutions are installed the local
hosts file can be updated so that the Solution web UIs are accessible on the installation machine.
$ sudo opendc hosts
It is important to run the
opendc command as
Access the Solutions
Now you can access the web UIs of the Solutions that provide one.