This year I have had the incredible opportunity to intern for the Redhat Inc.I was in the third year of engineering curriculum of computer science stream,The hunt for the summer internship began.I had always wanted to work with Redhat Group,So I decided to appear for the summer internship program from Redhat,Pune.I submitted my resume for the same and I got shortlisted for the summer internship program at Redhat,Pune.So I travelled for the same to pune as per the schedule of summer internship program.
The selection process started off with an aptitude test after which the shortlisted students were interviewed by them.I was asked questions on basic linux knowledge and python programming in the interview. The interview was all about how much I know about open source technologies.They asked questions on ansible,python basics like difference between a tuple and a list.When I was interviewed for two times,Finally I was selected for the summer internship under the guidance of my mentor Nikhil Kathole,Associate QE, SATELLITE6, RHCE for the internship.We stayed in communication by using Bluejeans video conferencing application.
In the summer internship I was tasked with exploring foreman technology.Foreman is a complete lifecycle management tool for physical and virtual servers. It gives system administrators the power to easily automate repetitive tasks, quickly deploy applications, and proactively manage servers, on-premise or in the cloud.So my progress started with first installing foreman on bare metal which was first fedora 28.I followed steps to install foreman from the documentation here…
https://www.theforeman.org/manuals/1.19/quickstart_guide.html
I faced some problems on with Fedora 28 as It was not working right on it So I switched my operating system to Centos 7 to use the foreman web interface for exploring.On Centos 7,It was successfully installed and running on localhost.After this I learned about vagrant software product for building and maintaining portable virtual software development environments, e.g. for VirtualBox, Hyper-V, Docker containers, VMware, and AWS which try to simplify software configuration management of virtualizations in order to increase development productivity.I installed vagrant on my bare metal by using its documentation.
https://www.vagrantup.com/docs/index.html
After installation,I had to setup a virtual machine with foreman instance by using a vagrant file.I used this vagrant file from this repo by forking it on my localhost from github.
https://github.com/garystafford/foreman-vagrant
I took reference from blogs of my mentor which was shared to me for initial setup of everything.
In the summer internship I was asked to write ansible roles to populate various entities in the foreman instance basically by using Hammer Cli tool. I learned about Ansible Roles and how to use them to populate various entities such as users,operating systems,architectures in foreman I wrote basic ansible scripts first which I ran on virtual machine on which foreman was installed by mentioning the ip address of virtual machine in the scripts.To store my work and share it with my mentor I created a repository on github and learned to create a representative Readme file for the repo in which I wrote all description about the repository and how to use it.Here is the link of repo on github.
https://github.com/VARADSP/Foreman_Code
I was asked to create a documentation for the project using Sphinx tool which is a python based documentation tool.I learned and created documentation for the project.I hosted it on github with rawgit.Here is link for documentation
https://cdn.rawgit.com/VARADSP/Foreman_Code/8a70c14b/doc/_build/html/index.html
In the ansible scripts I used the command module of ansible to run the hammer cli commands to populate the entities in foreman.After writing ansible scripts, I created ansible roles from them using ansible galaxy command.
$ ansible-galaxy init role_name
This forms a directory structure as follows:
README.md
.travis.yml
defaults/ main.yml
files/ handlers/ main.yml
meta/ main.yml
templates/
tests/
inventory test.yml
vars/ main.yml
Under tasks I put different scripts for different role.To run the ansible roles I used a single script runsetup.yml.By running a single script and passing my parameters in it,I executed those ansible roles I want to populate various entities in foreman simultaneoulsy.For example
In this file I was running a role create_os which is used to create operating system under foreman.By passing name,architecture_id,architecture etc, I run this script with
$ ansible-playbook -i inventory runsetup.yml
In inventory file I mentioned my foreman servers as follows:
This script is run on these two foreman servers theforeman.example.com and foreman.varadsp.com and a fedora 28 operating system gets created in the foreman instance of these servers.After successful run,You get the output as follows:
These roles created a network of ansible scripts which can be run from executing a single script,In this case is runsetup.yml.
Throughout the internship, I interacted with my mentor on weekly basis on Bluejeans and he provided me proper guidance to reach my goal.I learned many new technologies due to this summer internship.In a nutshell, my summer internship with Redhat Inc. was nothing short of a delight, and I’ll cherish this experience for years to come.The struggle was totally worth it.
Thank You !
Comments
Post a Comment