Member-only story

Working with Database - 5: Running MS SQL Server and Webserver(Apache)+PHP App On The Amazon Elastic Container Service (ECS) By Using Jenkins CI/CD Pipeline

We will prepare a pipeline in Jenkins to deploy the MS SQL Server and Webserver(Apache)+PHP App to the Amazon ECS cluster. To do this, firstly, we will prepare a “Jenkins file” to tag and push the docker images to the Amazon ECR private repo, and deploy the “Database and Apps” to the Amazon ECS cluster by using the Jenkins file.
Also, we will create a GitHub Webhook to auto-trigger the “database and application pipeline” when the developer pushes new codes to the GitHub Repository. Then, we will try if this works or not. We’ll check that both containers run in Amazon ECS.
And finally, we will troubleshoot in the Jenkinsfile Pipeline regarding the problems I encountered.
In this article, we will do all of these practically step by step.

Cumhur M. Akkaya
17 min readNov 4, 2024

Topics we will cover in this article:

1. Creating a New Folder For The Amazon ECS Of The Test
2. Creating a “GitHub Personal Access Token” On GitHub
3. Creating a GitHub Webhook To Auto-trigger The Database And Application Jenkins Pipeline
4. Creating Role: ecsTaskExecutionRole For Amazon ECS
5. Creating an Amazon ECS Cluster
6. Creating a Task definition file
7. Registering The Task definition file
8. Creating a Service (The Web server and MS SQL Server)
9. Preparing And Explaining a Jenkinsfile For The Application Pipeline
10. Pushing Created Files To The Remote Repo (GitHub)
11. Preparing And Running a Jenkins Pipeline
12. Troubleshooting In The Jenkinsfile Pipeline
13. The Output Of The Jenkinsfile Staging Pipeline on Amazon ECS
14. Seeing How The Blue/Green Deployments Strategy Runs In Amazon ECS, Step By Step
15. Clean Up
16. Conclusion
17. Next post: “Working with Database - 6: Running MS SQL Server and

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Already have an account? Sign in

Cumhur M. Akkaya
Cumhur M. Akkaya

Written by Cumhur M. Akkaya

✦ Multi-Cloud & DevOps Engineer, ✦Technical Writer, ✦AWS Community Builder, ✦LinkedInTop Voice, ✦Believes in learning by doing, ✦ linkedin.com/in/cumhurakkaya

Responses (1)

Write a response