Here are the top 10 DevOps Tools to focus on to put your DevOps learning on a faster track and kick start your career quickly as a successful Cloud engineer or DevOps engineer in about 10 to 12 weeks from now.
Here are the top 10 DevOps Tools to focus on to put your DevOps learning on a faster track and kick start your career quickly as a successful Cloud engineer or DevOps engineer in about 10 weeks from now.
Finally having some scripting knowledge is also good by learning Python, YAML, Ruby. and also having some Cloud experience on AWS and Azure will be extremely helpful.
Setup SSH keys and upload public key into Ubuntu EC2 instance where LAMP stack will be installed.
Modify hosts/inventory file to add target EC2 instance ip address/dns name.
port 80 is opened in firewall rule for Apache
Steps to setup SSH keys:
1. Login to Ansible management server/machine. Create SSH keys in Ansible host machine by executing the below command: (if you already have keys created, please skip this step)
ssh-keygen
enter three times..now you will see keys successfully created. 2. Execute the below command on Ansible management node and copy the public key content: sudo cat ~/.ssh/id_rsa.pub
copy the above output. 3. Now login into target node where you want to install LAMP stack, execute the below command to open the file sudo vi /home/ubuntu/.ssh/authorized_keys type shift A and then enter now and paste the key in the above file. please do not delete any existing values in this file.
4. Now go back to Ansible mgmt node, do changes in /etc/ansible/hosts file to include the node you will be installing software. Make sure you add public or private IP address of target node as highlighted below in red color: sudo vi /etc/ansible/hosts [My_Group] xx.xx.xx.xx ansible_ssh_user=ubuntu ansible_ssh_private_key_file=~/.ssh/id_rsa ansible_python_interpreter=/usr/bin/python3
Ansible playbook for installing LAMP(Linux Apache MySQL PHP) stack on Ubuntu
Setup SSH keys and upload public key into Ubuntu EC2 instance where LAMP stack will be installed.
Modify hosts/inventory file to add target EC2 instance ip address/dns name.
port 80 is opened in firewall rule for Apache
Steps to setup SSH keys:
1. Login to Ansible management server/machine. Create SSH keys in Ansible host machine by executing the below command: (if you already have keys created, please skip this step)
ssh-keygen
enter three times..now you will see keys successfully created. 2. Execute the below command on Ansible management node and copy the public key content: sudo cat ~/.ssh/id_rsa.pub
copy the above output. 3. Now login into target node where you want to install LAMP stack, execute the below command to open the file sudo vi /home/ubuntu/.ssh/authorized_keys type shift A and then enter now and paste the key in the above file. please do not delete any existing values in this file.
4. Now go back to Ansible mgmt node, do changes in /etc/ansible/hosts file to include the node you will be installing software. Make sure you add public or private IP address of target node as highlighted below in red color: sudo vi /etc/ansible/hosts [LAMP_Group] xx.xx.xx.xx ansible_ssh_user=ubuntu ansible_ssh_private_key_file=~/.ssh/id_rsa ansible_python_interpreter=/usr/bin/python3
Ansible playbook for installing LAMP(Linux Apache MySQL PHP) stack on Ubuntu
Here are the top 10 DevOps Tools to focus on to put your DevOps learning
in fast-track and kick start your career quickly as a
Cloud or DevOps engineer in about 8 weeks from now.
Extract TeamCity
tar -xvf TeamCity-2020.1.5.tar.gz
sudo mkdir /opt/JetBrains
sudo mv TeamCity /opt/JetBrains/TeamCity
cd /opt/JetBrains/TeamCity
Create service file
sudo nano /etc/init.d/teamcity
(copy the whole text colored in green) #!/bin/sh ### BEGIN INIT INFO # Provides: TeamCity autostart # Required-Start: $remote_fs $syslog # Required-Stop: $remote_fs $syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start teamcity daemon at boot time # Description: Enable service provided by daemon. # /etc/init.d/teamcity - startup script for teamcity ### END INIT INFO # Ensure you enter the right user name that TeamCity will run under USER="ubuntu" export TEAMCITY_DATA_PATH="/opt/JetBrains/TeamCity/.BuildServer" case $1 in start) start-stop-daemon --start -c $USER --exec /opt/JetBrains/TeamCity/bin/runAll.sh start ;; stop) start-stop-daemon --start -c $USER --exec /opt/JetBrains/TeamCity/bin/runAll.sh stop ;; esac exit 0
Ctrl + O enter
Ctrl + X enter
sudo chmod +x /etc/init.d/teamcity
sudo update-rc.d teamcity defaults
sudo /etc/init.d/teamcity start
Open browser and access team city url in the browser
http://public_dns_name:8111
Click on Proceed.
Select database type as jdbc driver as Postgres SQL from the dropdown and Click on Proceed.
now you need to download the jdbc driver at below location.
cd /opt/JetBrains/TeamCity/.BuildServer/lib/jdbc
sudo wget https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar
Select database type as PostgreSQL
Refresh JDBC driver
You should see like this —> Loaded PostgreSQL JDBC driver version: 9.4
Now provide the below info
Enter database Host - localhost
Enter database name - teamcity
User name - teamcity
Password - password
Click on Proceed
please wait and watch..As It may take a few mins…
Scroll down the page, Accept license agreement
Uncheck Send anonymous usage statistics
Continue button, Register as a user and create an account
Here are the top 10 DevOps Tools to focus on to put your DevOps learning on a faster track and kick start your career quickly as a successful Cloud engineer or DevOps engineer in about 12 weeks from now.
Puppet is a configuration management tool, similar to Ansible,
Chef and SaltStack. Puppet also can be used for automating infrastrcture as well.
Puppet is based in client/server model. The server does all
the automation of tasks on nodes/servers that have a client(agent)
installed. The work of the Puppet agent is to send facts to the puppet
master and request a catalog based on certain interval level(default
time 30 mins). Once it receives a catalog, Puppet agent applies it to
the node by checking each resource the catalog describes. It makes
relevant changes to attain the desired state. The work of the Puppet
master is to control configuration information. Each managed agent node
requests its own configuration catalog from the master.
We will see how to setup Puppet Master in Ubuntu 18.0.4.
Pre-requistes:
Install Puppet master on new Ubuntu with medium instance port 8140 needs to be opened.
Steps:
First let us see how to install Puppet 6.x on Ubuntu 18.0.4.
Steps for Puppet Master Installation 1. Modify Puppet Master Hosts file to add hostname of Puppet Master sudo vi /etc/hosts
(the above command is to start the service during starting the Ubuntu instance) sudo systemctl start puppetserver.service (The above command is for starting the server and this may take some time) sudo systemctl status puppetserver.service
Now press q to come out of window.
Add puppet master ip address and puppet next to it like shown below
This confirms that Puppet Master is installed successfully. Verify which version of Puppet installed by executing below command: apt policy puppetserver
2. you need to install the aws-sdk-coreand retries gems as root (or superuser): sudo /opt/puppetlabs/puppet/bin/gem install aws-sdk-core retries
Done installing documentation for retries after 0 seconds
6 gems installed
3. Also install AWS SDK for accessing resources in AWS sudo /opt/puppetlabs/puppet/bin/gem install aws-sdk -v 2.0.42
Done installing documentation for retries after 0 seconds
4 gems installed
4. Now you can install puppet-labs-aws module sudo /opt/puppetlabs/bin/puppet module install puppetlabs-aws
That's it. Puppet Master is setup successfully!!!!
You can watch the above steps in YouTube as well.
Ansible is one of the popular configuration management tools. Ansible
can also be used for infrastructure provisioning as well in AWS. Please
find steps for installing Ansible on Apple Mac OS or laptop.
Ansible can be installed on Mac OS many ways, but preferred way is using pip which is a Python package manager.
Install Pip
If pip isn’t already available on your system, run the following commands to install it: curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py python3 get-pip.py
pip --version
Once pip is installed, install Ansible using pip.
Install Ansible using Pip
To install ansible globally, use following command sudo -H pip3 install ansible
Once Ansible is installed, you can verify the version.
ansible --version
You should be able to see the version.
Install Boto framework
Boto is a Python package that provides interfaces to Amazon Web Service. It is AWS SDK for Python.
sudo pip install boto sudo pip install boto3
Create Ansible hosts file
when you install Ansible on Mac OS, it does not create ansible hosts file. so you need to create it.
sudo mkdir /etc/ansible
Watch the above steps as a video in YouTube channel:
Nexus is an open source, Java based binary repository manager, used for storing build artifacts. We will eventually
integrate Nexus with Jenkins for uploading WAR/EAR/JAR files.
Here are the steps for installing Sonatype Nexus 3 in RHEL in EC2 on AWS. Please create a new Redhat EC2 instance with small type. Choose Redhat Enterprise 8.
Pre-requisites:
Make sure you open port 8081 in AWS security group
Installation Steps:
sudo yum install wget -y
Download Java 8
sudo yum install java-1.8.0-openjdk.x86_64-y
you can confirm java is installed by typing the below command: java -version
Execute the below command to navigate to /opt directory by changing directory:
Extract Nexus
sudo tar -xvf nexus3.tar.gz
sudo mv nexus-3* nexus
Create a user called Nexus
sudo adduser nexus
Change the ownership of nexus files and nexus data directory to nexus user. sudo chown -R nexus:nexus /opt/nexus
sudo chown -R nexus:nexus /opt/sonatype-work
Add Nexus as a user
sudo vi /opt/nexus/bin/nexus.rc
change as per above screenshot by removing # and adding nexus
Modify memory settings in Nexus configuration file
sudo vi /opt/nexus/bin/nexus.vmoptions
Modify the above file as shown in below:
-Xms512m -Xmx512m -XX:MaxDirectMemorySize=512m
after making changes, press wq! to come out of the file.
Configure Nexus to run as a service
sudo vi /etc/systemd/system/nexus.service
Copy the below content highlighted in green color.