GitHub Support Comes to Cloud Assembly!
Several months go we enabled GitLab Integration to synchronize blueprints from GitHub based synchronization of blueprints to Cloud Assembly. This month, we have expanded this integration to include GitHub as a source control manager (SCM) provider!
Infrastructure as Code with Source Control Sync!
One of the core tenants of an Infrastructure as Code approach to blueprinting is the mandate of a declarative state. In Cloud Assembly, we automatically generate (with a few configurable options) this declarative state blueprint for you as you construct your deployment on the canvas. This model serves as a recipe for deploying your infrastructure across multiple clouds. When looking at this blueprint, it’s very easy to understand the end result of the deployment based on that declarative nature of the blueprint.
In our previous automation platform, the only way to manage blueprints was from within the platform. We cold export our blueprints using Cloud Client and store them – but ultimately this was a manual process. This all has changed in Cloud Assembly! With Cloud Assembly and our native integration with Source Control, we enable users to interact with that blueprints in a native “code” way; leveraging IDE’s and event GitHub/GitLab directly!
This awareness of different interaction points continues to be one of the key ways we differentiate our platform – by providing a number of consumption methods for the varying types of users!
Quickly Integrate and Consume Blueprints in GitHub
As a method of getting started quickly, a starter repository has been provided with a sample blueprint. We will “fork” this repository into your GitHub account and bind to your environment! A fork is your own personal copy of an existing Github repository. Navigate to https://github.com/codyde/cas-blueprints to get started! You’ll need to have your own GitHub account and be signed in for this next part to work!
On that repository page, click the Icon on the top right corner of the screen to “fork” the repo into your own!
With our new fork in place, we will need to generate an API key for interacting with GitHub. This allows us to give Cloud Assembly permission to “pull” our blueprint in! After the forking completes, select your user icon on the top right corner of the screen, and select the settings submenu.
From the settings menu Select “Developer Settings” on the bottom right, followed by “Personal Access Tokens”. Select “Generate new token”. Re-authenticate to the platform if you are prompted (a common security measure by GitHub). On the next screen, provide a description of the token, and select “repo” permissions followed by “Generate Token” on the bottom of the screen.
The next screen will display a token that you can use to grant Cloud Assembly permissions to the repository!
Binding our GitHub Integration
Navigate into Cloud Automation Services and then Cloud Assembly. Select the Infrastructure menu on the top, followed by the Integrations menu on the left. Select the GitHub integration.
Paste our Token into the integration screen, name our account and select Validate. It should return back green and indicate a successful validation. We’re almost there! Select “Submit“.
Select back into our GitHub integration, and select the Projects tab on the top. You may need to paste in your token a second time and revalidate. Select Add Project, and select the project you would like to bind to. Select Next.
From here, an Add Repositories screen will display. Configure the repository with the appropriate details as follows…
- Repository: username/repository name (codyde/blueprints in my case)
- Branch: Enter “master”. You could use this field to leverage new branches for specific testing
- Folder: Leave blank, We could use this field to specifically sync an individual folder
- Type: Select “Blueprints”; more on this field in a later blog post 🙂
Clicking next with the values correctly entered will complete the configuration. That project now receives GitHub sync’d blueprints.
When the Green indicator appears indicating an update has been received – the synchronization is complete. When we navigate to the Blueprints tab, we can see our blueprint has synchronized into the platform from our GitHub repository.
As you can see, it’s extremely easy to get started bringing Blueprints into Cloud Assembly using our native integration with GitHub. The integration doesn’t stop there; as we’ve still got Actions that we can configure to synchronize out of Github as well – but that’s a blog for another day…
Make sure you’re heading over to https://cloud.vmware.com where you can sign up for a trial of Cloud Automation Services!