Modernising Web Operations with AWS CodePipeline
The Evolution of MBL Apartments in Hungary
Introduction
Located in the Highlands of Lake Balaton, MBL Apartments in Rezi, Hungary, had a somewhat manual approach regarding their online presence. Their website updates were all carried out manually, resulting in time-consuming procedures and potential errors. Recognising the urgent need for automation, they enlisted my help to streamline their web operations.
Challenges and Obstacles
Making the shift from manual systems to automated workflows is not straightforward, and we identified several obstacles and risks:
1. Limited Technical Expertise: MBL Apartments excels in hospitality but needs to gain experience in cloud services and CI/CD.
2. Risk of Operational Interruptions: Changes to web operations could disrupt their online booking system.
3. Resource Constraints: The company’s focus on providing accommodation means it can allocate fewer resources to the automation transition.
Solution: Achieving Operational Excellence with AWS CodePipeline
To address these challenges, we built a streamlined, automated CI/CD pipeline for MBL Apartments using Amazon’s CodePipeline.
Practical Steps
Initial Setup
- Set up an AWS CodeCommit repository: This is where we safely store the source code for the website.
- Initiated a Cloud9 environment: This enabled cloud-based development and testing.
Code Management
- Cloned the CodeCommit repository into the Cloud9 workspace.
- Downloaded the website source files for MBL Apartments and updated the repository.
git add .
git commit -m "1st commit"
git push
Deployment to Amazon S3
- Established an Amazon S3 bucket: To host the website.
- Initially set the bucket to block public access.
- Later enabled static website hosting, specifying `index.html` and `error.html` as the files to use.
- Set a public access policy for the bucket.
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "PublicReadGetObject",
"Effect": "Allow",
"Principal": "*",
"Action": [
"s3:GetObject"
],
"Resource": [
"arn:aws:s3:::<Bucket-Name>/*"
]
}
]
}
- Used Cloud9 to sync the website files to the S3 bucket.
mbl-repo
aws s3 sync . s3://<bucketname>
Finalisation
- Configured AWS CodePipeline for automated deployments.
- Made a small change in index.html for testing.
- Verified the CI/CD pipeline to make sure the website reflected the changes automatically.
Further Reading
Amazon CodePipeline(https://aws.amazon.com/codepipeline/
Amazon CodeCommit(https://aws.amazon.com/codecommit/
AWS S3 Hosting Guide (https://docs.aws.amazon.com/AmazonS3/latest/userguide/HostingWebsiteOnS3Setup.html)
Conclusion
The successful deployment of the AWS CodePipeline has modernised the web operations for MBL Apartments. They can now concentrate on their core business — providing exceptional animal lover accommodation — while the website updates itself, saving time and minimising errors. The move to automation has been a significant enhancement to MBL Apartments’ overall service offering.