-
Notifications
You must be signed in to change notification settings - Fork 3
CI CD Instructions
Sneha Tilak edited this page Dec 14, 2016
·
6 revisions
- Each one of the micro-services (Gateway, Route Manager, Registry, Data Ingestor, Storm Detector, Storm Clustering, Forecast Trigger, Run Weather Forecast) is created in a seperate branch under master in our repository (TeamAviato - https://github.com/airavata-courses/TeamAviato).
- We have used Travis CI to continuously integrate and Amazon AWS to continuously deploy the changes made to the system.
- Each feature branch has a .travis.yml and appspec.yml file which provide build instructions along with deploy instructions.
- Make a change to the Deploy.txt file under each branch (one at a time) to trigger the Travis CI build.
- Once the build is successful, it will start deploying on Amazon AWS.
- The artifacts (zip files) will be uploaded to the S3 bucket and deployed to the EC2 instance.
- The containers will get created. The Registry, Gateway and Route Manager micro-services are considered to be single point of failure. The other micro-services will be deployed to all three instances (1 Oregon and 2 Ohio) and register themselves on the Zookeeper servers.
Prerequisite -
MySQL is installed in the Oregon EC2 instance.
Steps:
#Check if MySQL is already installed
rpm -qa | grep mysql
if [ "$?" -ne 0 ]; then
echo 'Installing MySQL...'
sudo yum install -y mysql mysql-server
echo 'Change directory to that of MySQL'
cd /etc/rc.d/init.d/
sudo service mysqld status
sudo service mysqld start
#Check if MySQL is already installed
rpm -qa | grep mysql
fi
mysql -u root -p
echo 'root'
#Drop existing database
echo 'DROP DATABASE IF EXISTS registry;'
#Create database
echo 'CREATE DATABASE IF NOT EXISTS registry;'
#Use database
echo 'use registry;'
#Create table
echo 'CREATE TABLE logservice(timestamp VARCHAR(45) NOT NULL,requestid TINYTEXT NOT NULL,username VARCHAR(45) NOT NULL,servicename VARCHAR(45) NOT NULL,description MEDIUMTEXT NOT NULL,PRIMARY KEY (timestamp));'
#Exit from database
echo 'exit;'
For the Zookeeper ensemble, we must manually create myid files with the number label (1, 2 or 3) of the Zookeeper server under the /var/lib/zookeeper (given while installing zookeeper) directory.