In the previous two post, we have discussed how to write a bash script with AWS CLI to create AWS Lightsail instance and, how to setup a service connection in Azure DevOps for AWS. IN this post, lets explore the steps required to get the bash script executed in a release pipeline to create AWS Lightsail infrastructure.
As the first step we need to create a build pipeline to publish the script as an artifact. Instead of creating a build you can directly use the Azure Git repo in the release as an artifact as well. However, let’s create a build and release pipeline both to implement a clear solution.
In the build pipeline we can add a copy file step to copy the bash script to build artifact staging directory. Then using a publish step we can publish the content of the build artifact staging directory as build output.
The build produces an output drop with the file. Using the build as a trigger we can setup a release pipeline. In the release pipeline you can add AWS Shell script step. In the step select the AWS service connection, we have created in the previous post. Then select the script that is in the build artifact as the script to execute. You need to supply the four arguments, name of the AWS Lightsail instance, the region (availability zone), the type of machine (blueprint) and the size (bundle) as parameters.
You can setup them as variables in the release pipeline. You can define same step in multiple stages in release pipeline to enable creation of multiple environments in the release workflow.
Once the pipeline is executed, AWS Lightsail instance would be created if it is not already exist.
SQL Server Integration Services (SSIS) projects can be created to perform ETL (Extract Transform and Load) operations. As Implementing of Co...
Task groups are really useful to share common actions with multiple build or release pipelines in Azure DevOps (VSTS). You can group multip...
You can easily clone a build and create a new build definition in the same team project. This is useful when you have similar type of applic...
Pull Request are the controlled way to bring in the changes to your stable branches in your Azure Git repos, or for that matter all Git prov...
Adding Azure Subscription to Azure DevOps as service connection is really simple when you have the same account you are using for Azure Dev...