Skip to content

Hootenanny Release Process

Garret Voltz edited this page Mar 5, 2021 · 11 revisions

Performing a Hootenanny Release

Requirements

  • C2S Account and AWS Keys
  • Smoke Test Documentation
  • Jenkins Account
  • .gpu data
  • OSM account
  • software packages: make, docker, vagrant, git

C2S Account and AWS Keys

The release process conducts RPM installs of the Hootenanny source code on a EC2 instance. Therefore, the user installing the RPMs will need a C2S account with EC2 and S3 privileges. A C2S account for unclassified and classified (govcloud) can be provided by Tim O'leary and AWS keys are generated using gimme-aws-creds.

Smoke Test Documentation

The steps to perform the smoke test are documented in a shared word document. That file can be found here

Jenkins Account

Jenkins is the CI/CD tool used to run checks and validations against changes to source code. An account is needed on the unclassified Jenkins instance and the classified Jenkins instance in govcloud. A POC for obtaining a Jenkins account is Seth Putnam. In order to see the Jenkins landing page, the user's public IP must be whitelisted in the security group attach to each instance.

.gpu data

The .gpu data enables the user to sign the built RPMs. This data isn't stored anywhere publicly for security reasons and shared among co-works. A POC for the .gpu data is Seth Putname or Justin Bronn.

OSM user account

Hootenanny oauth authenticates a user account from OSM to access Hootenanny and perform the smoke test. To create a user account go here.

Checks

The are a number of jenkins jobs that must have succeed before building the RPMs. The Jobs are listed below, and if any show a failure alert the nome-ui, hootenanny, and/or hoot-core team via slack.

unclassified Jenkins Instance
Hootenanny
Hootenanny-rpms
Hootenanny-ui
hootenanny_valgrind

classified Jenkins Instance
hoot-tests

Release Process

  1. Confirm with Hootenanny team that the source code master branch is in a good state to cut a release tag
  2. Check that the Jenkins jobs have successfully passed
  3. After confirming Jenkins jobs passed cut a tag from the master branch. Use this as a template to fill out the tag data. Before clicking publish release, toggle the check box that this tag is a pre-release.
  4. Build the RPMs. Documentation on how to do so can be found here. Go up to step 4 on this page. If issues occur when building the RPMs reach out to Seth Putnam or Justin Bronn
  5. Create an EC2 instance (shown below)
  6. Provision the instance to install the built RPMs (shown below)
  7. Install the RPMs on the EC2 instance yum -y install hootenanny-autostart
  8. Update Tomcat8 hoot-services.conf file installed from the RPMs sed -i 's,oauthRedirectURL=http://localhost:8080/login.html,oauthRedirectURL=http://[EC2 public ip]:8080/hootenanny-id/login.html,' /var/lib/tomcat8/webapps/hoot-services/WEB-INF/classes/conf/hoot-services.conf
  9. Restart the Tomcat service systemctl restart tomcat8
  10. Go to the hootenanny landing page and confirm you can login using OSM credentials http://[EC2 public ip]:8080/hootenanny-id/login.html
  11. Perform the smoke test using the documentation and alert the hootenanny team of success or failures
  12. After smoke test passes continue on the RPM build documentation at step 5. Note: signing RPMs require a password shared among co-workers. That password can be obtained by Seth Putnam.
  13. Inform Hootenanny team the RPMs have been signed and uploaded to S3
  14. Upload the hootenanny source tar to the release page on github. The tar is generated from step 2 in the RPM build documentation
  15. Edit the release page, toggle that it's not a pre-release and click 'publish release'

Create EC2 Instance

  1. log into C2S
  2. select EC2 microservice
  3. click 'Launch Instance'
  4. select AMI 'ami-06cf02a98a61f9f5e' under the Community AMIs tab
  5. select instance size m5.2xlarge
  6. select network 'nome-dev' then click 'Next: add storage'
  7. change Size (GiB) to 40 then click 'Next: add tags'
  8. add tags (Name: hootenanny-release-candidate-[version], user: [person doing smoke test], env: testing, group: hootenanny) then click 'Next: Configure Security Group'
  9. select security group that grants access to user doing the smoke test and person provisioning the EC2 instance then click 'Review and Launch'
  10. review instance details and after confirming the correct details click 'Launch'
  11. select a ssh key the user that provisions the EC2 instance holds then click 'launch instance'

Provision EC2 Instance

  1. ssh to the created EC2 instance ssh -i [key] centos@[public ip address]
  2. run the following commands in order
sudo su
yum -y install epel-release & yum -y update
yum -y install createrepo vim wget
cd /etc/yum.repos.d/
wget https://hoot-repo.s3.amazonaws.com/el7/pgdg95.repo
wget https://hoot-repo.s3.amazonaws.com/el7/deps/release/hoot-deps.repo
cat <<EOF > hoot.repo
[hoot]
name = Hootenanny RPMs
baseurl = file:///usr/src/hoot
enabled = 1
gpgcheck = 0
EOF
mkdir /usr/src/hoot/
  1. locally scp built rpms to the EC2 instance scp -i [key] centos@[public ip address]:/tmp/
  2. on the EC2 machine move the built rpms to the /usr/src/hoot directory sudo mv /tmp/hoot*.rpm /usr/src/hoot/
  3. create the repository metadata cd /usr/src/hoot && createrepo .
  4. run the following commands and confirm the hootenanny-autostart package is found
yum clean all
yum makecache
yum info hootenanny-autostart
Clone this wiki locally