The goal of Deployment 6 was to enhance the reliability of our banking application infrastructure. By doing this, we increase the confidence of our users, ensuring they have consistent and uninterrupted access to our services. This growth in user confidence will cause an increase in user loyalty which directly translates into more transactions & revenue.
Our last deployment, 5.1, decoupled our application from our Jenkins server. This partially addressed the single point of failure issue and using Jenkins agents made our system architecture more distributed. However, our infrastructure was still allocated in a single region, leaving our system vulnerabe to a disaster and possible latency issues. We were also using SQLite, leaving our customers data exposed to anything that has access to our server. Our 2nd application server was also just used as a standby instance incase an availability zone went down.
-
We decoupled our database from our application by moving away from SQLite and using AWS RDS and this came at a cost of an increase in latency sinces we're no longer reading and writing data locally. However, we increased the scalability and flexibility of our database conponent. We also took a step ij the direction of making our users data more secure.
Using Load balancer URL directly in browser | Using CURL with URL in command line |
---|---|
We found that we needed to add a rule to our security group that allows egreess traffic to port 8000, our applicatoions port.
Default Outbound Security Group rules | Updated Outbound Security Group rules |
---|---|
This error occured during the installation of our setup process on our application instances. I ran the commands line by line once the application didnt deploy automatically. I noticed that because we were not running these commands inside our Python virtual enviornment, we were experiencing configuration drift. To fix this, I simply switched the order of setup commands and we had a successful application launch.
# Go to GitHub settings
# Go to "Developer Settings" on the left panel
# Click "Personal Access Tokens"
# Click "Generate New Token" then "Generate Classic Token"
# Select repo, admin:org, admin:repo_hook
# Copy the token and paste it somewhere safe for future use
# Have you GitHub token ready & think of a name for your new repo
curl -O https://github.com/djtoler/automated_installation_scripts/blob/main/auto-github_repo_create.sh
chmod +x auto-github_repo_create.sh
./auto-github_repo_create.sh <YourGitHubToken> <NameOfYourRepo>
git remote add origin http://github.com/<YourUserName>/<NameOfYourRepo>.git
git clone https://github.com/djtoler2/Deployment6.git
cd Deployment6
git add .
git commit -m'pushing source code to remote repo'
git push
git checkout -b dev1
git push -u origin dev1
-
Using Terraform, configure 2 EC2 instances, 1 for our Jenkins controller server and 1 for our Jenkins agent server
curl -O https://raw.githubusercontent.com/djtoler2/Deployment6/main/ud_jenkins_agent_tf.sh
curl -O https://github.com/djtoler2/Deployment6/blob/main/ud_jenkins_controller.sh
Make sure our userdata scripts are in root directory | Use them in main.tf like this |
---|---|
![]() |
![]() |
-
- Run
./tf_deploy.sh
- Run
cd terraformInit
git add .
git commit -m"pushing infrastructure"
git push