This is the first guide in the ADOP series and is intended for deploying ADOP on Centos/Amazon Linux, so before you start, you should provision yourself an instance with one of the previously mentioned Linux distributions and with at least 8 GB of RAM (at least 16GB, if you are planning on building resource-heavy Java applications).
What is ADOP and what is included
ADOP is a cloud agnostic and pre-configured technology stack, containing everything that is needed for a proper implementation of Continuous integration and continues deployment. Although the name “ADOP” is an acronym for Accenture DevOps Platform, this solution is an open-source that is available to anyone free of charge, and anyone can build upon or adapt it for their needs. It is similar to Red Hat’s Fabric8 development platform, however, unlike Fabric8, ADOP is based on Docker.
ADOP includes Gerrit Code Review for storing and managing your source code via Git (as Gerrit is not the prettiest tool, it’s possible to switch to Gitlab as well), Sonatype Nexus, to store built applications as well as various other build artifacts, Sensu for monitoring, SonarQube code analysis, Selenium for automated browser testing, Elastic (ELK) stack for proper log management, and, of course, the heart of the stack – Jenkins CI, for Continuous Integration and Continuous Delivery. All of the services that are available in ADOP are tied together using Docker networks, and user credentials among them are shared using LDAP.
It is, of course, possible to set-up all of these services yourself, however, with the help of ADOP, it can be done with two commands, provided that you have an instance or a server with git and Docker pre-installed (see below for a full walk-trough):
git clone https://github.com/Accenture/adop-docker-compose.git . ./adop compose init
And most importantly, ADOP introduces concepts of Cartridges and Platform Extensions for sharing re-usable software delivery assets, for example, Jenkins jobs, that can be easily reloaded and used in multiple projects. What exactly are cartridges and platform extensions will be explained in later posts.
Before you begin – prepare environment
ADOP has only two pre-requisites – you need to have Git and Docker (including Docker Compose) pre-installed on the instance, where you plan to deploy ADOP. Let’ start by installing Git – connect to the freshly created/installed Centos/Amazon Linux instance, and type in the following commands to install it using the package manager:
sudo yum install git -y
Next, you will need to install and start Docker. The simplest way is to obtain the installation script directly from Docker and run it:
curl -fsSL https://get.docker.com/ | sh sudo service docker start sudo chkconfig docker on
At this stage, you should be able to run any Docker commands, but the downside is that you will need to run them as root (or trough sudo). Since we dont always want to run them as administrator, we will add our user to Docker user group – run the following command, by replacing your_username with your username:
sudo usermod -aG docker your_username
Log out and log back in. Afterwards, you should be able to execute command “docker run hello-world” and see similar console output:
$ docker run hello-world Unable to find image 'hello-world:latest' locally latest: Pulling from library/hello-world c04b14da8d14: Pull complete Digest: sha256:0256e8a36e2070f7bf2d0b0763dbabdd67798512411de4cdcf9431a1feb60fd9 Status: Downloaded newer image for hello-world:latest Hello from Docker! This message shows that your installation appears to be working correctly.
Since all of ADOP Docker images are deployed automatically using Docker Compose, via docker-compose.yml file, you will need to install it as well. To do this, lets open an administrator session, download and install the latest Docker Compose version from Github.
sudo su curl -L https://github.com/docker/compose/releases/download/1.8.1/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose chmod +x /usr/local/bin/docker-compose exit
Verify, that you have successfully installed Docker Compose by running the following:
Congratulations, we have set-up an instance to be able to run ADOP. Now the only thing left to do is to clone ADOP repository and deploy it.
git clone https://github.com/Accenture/adop-docker-compose.git cd ./adop-docker-compose
For automation purposes, it is useful to export initial admin user credentials – type in the following commands, replacing and with username and password of your choice. Please be aware, that the password must have letters and numbers, it cannot contain your username and must be at least 8 symbols long:
export INITIAL_ADMIN_USER=<username> export INITIAL_ADMIN_PASSWORD_PLAIN=<password>
This step can be omitted, as the ADOP deploy script will prompt you for the said credentials.
Lastly, run the ADOP deploy script:
./adop compose init
This script will automatically generate and export all the required variables, as well as pull and deploy all the required Docker containers. Depending on your internet connection, this might take about 15-30 minutes. Afterwards, you will be able to enter your instances IP address in the browser and connect to your ADOP stack.