Infrastructure management for docker stacks
First you need to install:
Then open a command line (windows or mac or linux).
Then change directory to where you keep projects e.g.
Then we need to clone the source code:
$ git clone https://github.com/binocarlos/viking $ cd viking
We use vagrant to start and stop virtualbox vms - to start the VM:
$ cd viking $ vagrant up
This will start a vagrant box and install dependencies.
ssh to vm
Once the Vagrant box has started - we need a command line for it so we SSH into the box.
$ vagrant ssh
NOTE: on Windows you will need to install Putty and use Puttygen (download from the same page) to convert the vagrant public key.
cd to /vagrant
Once you have a command line to the box - change directory to where this repo is mounted as a shared folder -
$ cd /vagrant $ ls -la
There is an admin script that will manage the stack for development:
$ viking help
Create a new project at path - this will automatically call configure
$ viking create <path>
This gets a project configured.
$ viking configure <path>
You can manually set variables in the .viking file inside the project folder
$ cat myproject/.viking API_VERSION=v1
$ viking up <path>
$ viking down <path>
show service status
$ viking status <path>
view app in browser
A port is mounted onto the host so you can enter
http://127.0.0.1:8080 into a browser once you have started the services.
build client assets
The client CSS and JS is bundled - use the admin bundle command to rebuild it
$ viking build <path>
You can configure the variables for viking itself by setting values in the
There are various types of test:
- acceptance tests - test the whole system against cloud instances
- integration tests - test parts of the system working together
- unit tests - test isolated unit of the system
To run the acceptance tests you must have vagrant and virtualbox installed and SSH into the VM:
$ vagrant up $ vagrant ssh vagrant$ cd /vagrant
To run the acceptance tests - the following variables must be configured:
cloud provider vars here
viking configure to enter these values.
$ viking test acceptance
will run the acceptance tests
$ viking test integration
$ viking test unit
$ viking test all