In a previous post (The 10 Foundations of DevOps for Traditional Applications: Virtual Machines are Not Dead), I outlined a CI/CD solution based on the 10 Foundation of DevOps model for traditional applications using VMware Cloud and Bitnami components. In this post, I’m going to take the first step in building out that solution.
For this example solution, I’m going to use:
- AWS EC2
- Bitnami Application Catalog
- vRealize Cloud Cloud Assembly
- vRealize Cloud Code Stream
- GitHub
Note: This is not intended to be a step-by-step, how-to guide. Instead, this is a high level overview of the tasks involved for users that already have familiarity with the concepts and components used. If more detail is required, refer to product documentation.
Subscribe to Bitnami Stack
- Bitnami Application Catalog stacks are detailed on the Bitnami Application Site. To launch Bitnami AMIs using vRelize Cloud Assembly we need to subscribe to the solution using the Amazon Market Place.
- Locate the applicable AMI (in this case Tomcat) and subscribe.
- Once you are subscribed “Continue to Configuration” where, after selecting the appropriate options you can copy the appropriate AMI. e.g. ami-00471a5f2fe379fb1
- Make note of the Bitnami documented instructions for using the image including credentials, configuration, and administration details.
Create Cloud Assembly Image Mappings
- The prerequisites for creating Image Mappings including connecting cloud assembly to your AWS account according to this KB article must be completed before creating the Image Mapping.
- Now you can search for AMI ids in the Image Mappings section of vRealize Cloud Assembly to create the Image Mapping.
- Take note of the Image Name you’ve used as you will need to use this exact name in the blueprint you create next.
Create and Test Cloud Assembly Blueprint
Create a vRealize Cloud Assembly Blueprint. See example YAML below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
name: bitnami-tomcat version: 0.1 formatVersion: 1 inputs: SelectCloud: type: string enum: - 'env:aws' hostname1: type: string default: bitnami-tomcat user: type: string title: SSH user description: Username for this deployment. default: vmware sshkey: type: string encrypted: true title: SSH public key. description: The public key for SSH connectivity (cat ~/.ssh/id_rsa.pub) resources: Cloud_Machine_1: type: Cloud.Machine properties: image: bitnami-tomcat-8.5.46 flavor: small cloudConfig: hostname: '${input.hostname1}' users: - name: '${input.user}' ssh-authorized-keys: - '${input.sshkey}' sudo: - 'ALL=(ALL) NOPASSWD:ALL' groups: sudo shell: /bin/bash |
Note: The above Blueprint YAML and other example vRealize Cloud Assembly content is available in this GitHub repository.
Creating a Blueprint
Finally, perform a deployment using this basic Blueprint to test the configuration.
Summary
We now have a basic vRealize Cloud Assembly Blueprint which can deploy a Bitnami Tomcat template to AWS EC2. This Blueprint is of course YAML code which is extremely easy to duplicate and modify to deploy any other Bitnami template to the same cloud. Further, only relatively minor changes are required to this overall configuration to enable this standardized deployment to different clouds.
About the Author
James Wirth is a member of the emerging technologies team within VMware Professional Services and focuses on DevOps, Site Reliability Engineering, Multi-Cloud architectures and new and emerging technologies. He is a proven cloud computing and virtualization industry veteran with over 15 years’ experience leading customers through their cloud computing journey.