Friday, January 14, 2022
Sunday, January 9, 2022
Building an base image (Amazon Machine Image (AMI)) using Packer
Requirement:
Create and upload a new ubuntu image (AMI) in amazon cloud using packer and version control.
Steps Involved:
- Create a free-tier account with aws.amazon.com
- Install packer in your local system
- Configure the aws user account to authenticate from packer
- Define and Create the base config for building a base image using package HCP format
- Run the packer utility and pass the config file.
- Validate the first base image in was management console.
How to install brew command-line utility in macOS
- (As a normal user) Download the install.sh script
- curl -O https://raw.githubusercontent.com/Homebrew/install/master/install.sh
- (Provide execute permission to the downloaded script file install.sh)
- chmod +x ./install.sh
- (Start the script execution)
- ./install.sh
- (Add the default Homebrew install path to default .zprofile)
- echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/$USER/.zprofile
- eval "$(/opt/homebrew/bin/brew shellenv)"
Sunday, December 26, 2021
How to make a user part of group in macOS Big Sur 11.6
Scenario: You are using the MacBook (with macOS Big Sur 11.6) for the first time and you wanted to install "brew" (or) "wget" (or) any other command-line utility
Let's consider user name is "webuser" and you wanted to make this user part of a "wheel" group to execute sudo commands. Use the command "dseditgroup"
$ (Run the command as root user in macOS)
$ dseditgroup -o edit -a webuser -t user wheel
o: Operation - read, create, edit, delete , checknumber
a: Name of the record to be added to the group specified by group name
t: Type of record to be added to or deleted from group specified by groupname. Valid values are user, computer , group or computergroup
wheel: groupname
Monday, December 21, 2020
DevOps | Automation | Migration :: Subversion (SVN) to GitHub Enterprise Migration with 500GB+ data and 50,000+ Commits.
Subversion is a Centralized Version Control system and GitHub Enterprise is distributed version control system.
In one of the project I recently lead the team for migrating code-base with over 10+yrs old application code-base of 500+GB data of telecom software application, including commit history from legacy SVN to Enterprise grade GitHub. Supported in validating the workflow with muti-project dependencies for over 46+ components successfully.Some of features used are described briefly below:-
SVN:
- SVN Externals was handling multi-module project dependencies in Subversion.
- All the artifacts of the application code base were directly stored in Subversion server.
GitHub Enterprise:
- GitHub was used to version control code/config or human readable file format. The maximum file size it supported was 100MB as de facto standard.
- Binaries/Artifacts were version controlled using GitLFS (Long File Storage)
- Multi-project dependencies were handled by Git Sub-module
Bridging of SVN and GitHub:
- git-svn utility was used to convert the SVN revision no based commits to GitHub Commit SHA-IDs
- Shell Script was used to handle preparation of authors file , import of SVN data and upload to GitHub
- GitHub API integration with Terraform were used for handling org/repo/team/GitHub branch protection.
- "git svn rebase" operation can be used to migrate the delta changes over a period of time.
- Jenkins Automation Server configuration to migrate SVN jobs to GitHub.
Developer Validation:
- sourcetree from Atlassian is best suited tool for - integrating GitHub/GitLFS/Git Submodule as a one stop solution.
- Sourcetree tool supports GitHub , GitHub Enterprise , GitLab and Bit Bucket
I hope the post will be useful for folks working in DevOps and Managing the software version control using SVN and if you have any plan in pipeline to migrate to GitHub Enterprise.
Challenges:
- Migration from SVN to GitHub was not free from challenges, we had quite a bunch in managing SVN index data generated from git-svn utility.
- We had commit history ranging from 100 to 50,000+ commits and it took days to migrate a specific telecom product releases.
- git-filter branch utility was used to clear index data reference, matching false positive files which blocked the migration or push operation to GitHub Enterprise repositories.
I would like to hear your experience if you have been going through any issues in your SVN migration activity and love to support if you have face any challenges.
References:
- https://www.sourcetreeapp.com/ - Free Sourcetree tool
- https://www.atlassian.com/git/tutorials/migrating-convert - git-svn utility
- https://www.hashicorp.com/blog/managing-github-with-terraform - GitHub API and Terraform onboarding
Tuesday, December 31, 2019
Happy-new-year-2020
- unconditional love
- sharing knowledge
- Forget & Forgive
- Be listenable
- winning yourself
- smile at others
- daily exercise
- Involve in sports
- Play with kids
- Talk over texting
- Live the moment
- Failing and rising
- brush twice a day
- take a family medical insurance
- Take a term policy
- Involve in your passion or hobby daily
- Improve on a second profession
- Music On - Dance alone
- listen to light music
- Go office early 😀 and reach home safe (wear seat belt and helmet)
- Happy new year 2020 wishes to all my friends and family members
Friday, May 10, 2019
How to remap/restore the openstack volume data
Issue:
Message/logs/symptoms of Hypervisor Failure:
- Instance is in an unrecoverable state.
- Instance was not accessible. Soft/Hard reboot did not fix, and now instance is in a "No State" status.
- Instance hosted on oscomp-chn-h01 which is currently down due to disk failure. Disk replacement required which results to data loss. Openstack team recommends to destroy and rebuild the instance.
Importance of Preserving the IP of an cloud instance:-
- Any firewall changes by firewall team done for enabling the infra access (such as Database) with this instance IP, will not have to be repeated.
- Any front-end server (haproxy) which is mapped to this backend instance IP (in haproxy.cfg), don't have to be changed.
- Any changes to GSLB (Global Server Load Balancing) for mapping the global domain name (eg: redhat.com) backend server ip address, need not be changed.
- Keystone - Authentication/Authorization
- Neutron - Networking
- Glance - Instance Images
- Swift - Unstructured Storage / Object BLOB (Binary Large Object)
- Cinder - Block Storage
- Heat - Openstack Orchestration
- Horizon - Openstack Dashboard
- Ceilometer - Monitoring / Metering
- Nova - Computing (cpu/memory/disk)
Steps to restore openstack volume data (once the instance is back online after preserving the IP address):
- physical volume name: /dev/vdb
- volume group name: vg_web_logs
- logical volume name: lv01_web_logs
- application mount point/folder name/path in linux : /var/logs/webserver_logs
- Makes sure the newly re-built (centOS 7.x is the operating system image) instance has the lvm2 (Logical Volume Manager) package installed.
References:
- https://www.openstack.org/software/project-navigator/openstack-components#openstack-services
- https://linux.die.net/man/8/




