- Make sure you have go version 1.11+ installed
- By default it will use MongoDB as the persistence repository. Unless you change it in the project's configuration, make sure that MongoDB is running and that it has the default configuration or provide the access URL with credentials in the
mongodb.urlproperty in the configuration file. - By default it will use Ansible to provision the new deployments so make sure that it's installed and configured if you want to provision kubernetes and other products such as helm or glusterfs which depend on it.
- If you plan to provision other products over kubernetes such as traefik or rook, the kubectl command is required as well.
- Checkout the repository and make sure the root folder of the project is called
deployment-engine. - Execute
go build -o deployment-enginein the root folder - Read the Configuration section for instructions about how to configure the different parameters of the deployment engine.
- Run the frontend by executing
./deployment-engine. The server should be listening in port 8080 unless configured otherwise.
- Make sure Docker is installed and running on your system
- Docker-compose is recommended to make running the engine easier
- Execute
docker build -t deployment-engine . - For easy execution we include a docker-compose deployment descriptor in
docker-compose.ymlthat can be run. To do so: - Create a folder in your machine and copy the docker-compose.yml file to it.
- Create a subfolder named
configand copy the provideddocker-compose/config.ymlfile to it. You can personalize it as described in the Configuration section. Don't modify the provided values except for the traefik section as they are tailored for the file layout present in the docker file. - Create a subfolder named
sshand create a pair of ssh keys with thessh-keygencommand. The files must be namedid_rsaandid_rsa.puband the private key must be created with an empty passphrase. - Run it with
docker-compose up - The default frontend should be available in port 8080 unless it was changed in the
docker-compose.ymlfile
The deployment engine will look for a ~/deployment-engine-config/config.yml file with the configuration. If it doesn't exist or it's empty, it will use some safe defaults. The properties that can be configured are:
repository.type: The type of the persistence repository to use. By default it'smongowhich will use MongoDBprovisioner.type: The type of provisioner to use for new deployments. By default it'sansiblefrontent.type: The type of frontend that will be available. The default valuedefaultwill start the default REST frontend described in the usage instructuions
mongodb.url: MongoDB URL to use for the persistence layer. By default it'smongodb://localhost:27017for local installation andmongodb://mongo:27017for dockermongodb.vault.passphrase: When using the vault functionality with mongoDB backend, this passphrase will be used to save the secret data encrypted into the database.
ansible.folders.inventory: Folder in which the deployment engine will store inventory information about deployments. It must be a folder writtable by the user which is running the application. By default it's/tmp/ansible_inventoriesalthough is strongly recommended to personalize this value if running locally.ansible.folders.scripts: Folder containing the ansible scripts to deploy the different products. Some scripts are already provided inprovision/ansiblefolder and that's the default value when running locally although it is strongly recommended too to provide a full path to this folder. When running in Docker this value will be automatically set.
Once installed, please read the usage instructuions