This file is an clarifying note for using the "install" software product. This product is a system for automatic deployment of cloud infrastructure, the main task of which is to install Liferay and integrate it with PostgreSQL from Jenkins and Ansible in Microsoft Azure.
- Testing software products in environments: postgreSQL, Jenkins, Liferay (for Testers)
- To get a ready-made server solution (for system administrators)
- Creating a simple workspace for generalists (developers, datascientists)
- For educational and educational tasks (for instructors, lectures, direction curators, timeleads)
- Makes "update" of the main OS repository
- Install Python3 and PIP required to start the deployment process
- Install software components terraform, ansible, azurecli - necessary to automate the process of deploying infrastructure
- Generates ansible inventory file, depending on the characteristics of the deployment VMs
- Connects ansible-vars and ansible-roles for automatization deployment of the server component.
- Establishes connection, basic setup, preparation for using postgreSQL, Jenkins, Liferay servers
- Install TomcatXJenkins and setup Jenkins and run PostgreSQL-Liferay-Wildfly deploy pipeline
- Jenkins pipline:
- Install postgreSQL server:
- Configuring postgreSQL
- Creating psql role
- Install postgreSQL server:
- Install liferay+wildfly-bundle and configures Liferay:
- Downloading postgres.jar and adding liferay config
- Complete Tomcat-Jenkins server, basic Jenkins setup, starting the postgresql-liferay-wildfly deployment process
- Installation and basic configuration of the postgreSQL server, creating the psql role
- Install liferay + wildfly-bundle, basic Liferay setup:
- Downloaded postgres.jar file, adding liferay config
Create the Service Principal which will have permissions to manage resources in the specified Subscription using the following command:
az ad sp create-for-rbac --role="Contributor" --scopes="/subscriptions/SUBSCRIPTION_ID"
output:
{
"appId": "00000000-0000-0000-0000-000000000000",
"displayName": "azure-cli-2017-06-05-10-41-15",
"name": "http://azure-cli-2017-06-05-10-41-15",
"password": "0000-0000-0000-0000-000000000000",
"tenant": "00000000-0000-0000-0000-000000000000"
}
These values map to the Terraform variables like so:
appId
is theclient_id
defined above.password
is theclient_secret
defined above.tenant
is thetenant_id
defined above.
Export Azure credentials
$ export ARM_CLIENT_ID="00000000-0000-0000-0000-000000000000"
$ export ARM_CLIENT_SECRET="00000000-0000-0000-0000-000000000000"
$ export ARM_SUBSCRIPTION_ID="00000000-0000-0000-0000-000000000000"
$ export ARM_TENANT_ID="00000000-0000-0000-0000-000000000000"
Go to netcracker_edu_project directory and use the command
./install.sh -e [e-mail for Liferay]
Install python3 and other dependencies.
#!/bin/bash
sudo yum update
sudo yum install -y python3
sudo yum install -y python3-pip
pip3 install --upgrade pip
pip3 install -r requirements.txt
python3 demo.py $@
Install all requirements, generates inventory files and ansible variables file, runs ansible-playbook.
Try --help to see which components can be set manually
python3 demo.py --help
Basic terraform functions:
- Creating resource group
- Configuring virtual network (public\private)
- Create security group
- Create 3 virtual machines in Microsoft Azure:
- 2 virtual machines - Standard_D1_v2
- 1 virtual machine - Standard_D2as_v4