You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
In Deployment 6, we solved several issues that our last deployment left us with.
We added an additional 2 application servers in US-West-2 for a multi-region infrastructure that'll fully address the single point of failure issue (minus configuration), ensuring that our application is prepared to still service customers in the event of a disaster
We added a single load balancer in each region to equally distribute ingreess traffic amongst our 2 instances that are in seperate AZs, increasing our banking applications availability to facilitate users transactions.
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.
We intergrated Terraform into our Jenkins pipeline, deploying our infrastructure via a Jenkins agent, which optimized our applications infrastructure depoyment proceess.
Issues
1. Load balancer return 504 error
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
2. Incompatable dependency versions during application install
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.
Steps
1. Download banking application source code from GitHub to local machine
Create a GitHub token
# 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
Run this script to create a remote GitHub repository using your token (GitHub Repo Creation Script)
# 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>
Set the remote GitHub repository in your local repository