I will share my experience on how i was able to setup Serverless CI/CD using powerful CI tool Teamcity, AWS Fargate, AWS S3 and Amazon ECR.
When we think of introducing or implementing CI/CD pipelines for our releases or deployments, One should always think of setting it in such a way that it shouldn’t introduce extra cost, the solution is scalable, future proof and secure by all means.
I will share my experience on how i was able to setup Serverless CI/CD using powerful CI tool Teamcity, AWS Fargate ,AWS S3 and Amazon ECR.
Although these days all cloud providers have their own serverless CI-CD like CodePipeline, Azure DevOps etc, but this is my implementation which can be used for any application that you want.
let’s first create EFS where we would be storing our configuration and data files for our TeamCity server, these are the files which you want to persists on the server, which means that even if our containers restart, we have the data persistence and for that we are using EFS.
This is important for the stateful application like TeamCity, Also we would schedule it to run only from MON-FRI to save costs.
You can do the same for the application which you don’t use often over the weekend or application which have less traffic, you can scale down the container to meet the demand without worrying about loosing data together with some cost saving.
Head over to Services->EFS
Select the VPC in which you plan to have your container/Application running and follow the steps as below.
Creating ECS Cluster
Once your EFS is ready you can start creating Cluster for your application to run, in our case TeamCity server. Please follow the below steps to create your own cluster.
An Amazon ECS cluster is a logical grouping of tasks or services. If you are running tasks or services that use the EC2 launch type, a cluster is also a grouping of container instances which we are using in this case.
Here you specify your VPC and Subnets, remember the cluster has to be created in the same VPC as your EFS otherwise we had to create peering connection and few other steps, which is not part of this exercise.
Below you can select Container Insights to get metrics such as CPU and Memory available, this feature is recently added previously you had to add metrics collectors to your containers to get those metrics.
Once the Cluster is ready, we need to change the launch configuration to update our userdata section to create few directories and install efs client.
Follow the below steps for changing the Launch Configuration.
User Data would be something like this.
#!/bin/bash echo ECS_CLUSTER=TeamCity-Server >> /etc/ecs/ecs.config;echo ECS_BACKEND_HOST= >> /etc/ecs/ecs.config; yum install -y amazon-efs-utils mkdir /opt/teamcity mkdir -p /data/teamcity_server/datadir
Mismanagement of multi-cloud expense costs an arm and leg to business and its management has become a major pain point. Here we break down some crucial tips to take some of the management challenges off your plate and help you optimize your cloud spend.
DevOps and Cloud computing are joined at the hip, now that fact is well appreciated by the organizations that engaged in SaaS cloud and developed applications in the Cloud. During the COVID crisis period, most of the organizations have started using cloud computing services and implementing a cloud-first strategy to establish their remote operations. Similarly, the extended DevOps strategy will make the development process more agile with automated test cases.
Take a look at some of the top cloud migration services you can use to migrate your services from on-premises to AWS Cloud. You need to understand the general terms of this field.
At some point we've all said the words, "But it works on my machine." It usually happens during testing or when you're trying to get a new project set up. Sometimes it happens when you pull down changes from an updated branch.
To move or not to move? Benefits are multifold when you are migrating to the cloud. Get the correct information to make your decision, with our cloud engineering expertise.