-
Railway.app Domain: shavok.up
-
AWS Domain: devops-tw.up.railway.app
Endpoint | Description | Response |
---|---|---|
/ |
Home Endpoint | Welcome message |
/status |
Application Status | JSON status |
/pic |
Image Retrieval | Random Static image |
/health |
Health Check | Health status |
/joke |
Joke Endpoint | A random joke |
/echo |
Echo Endpoint | Echoes the input JSON |
/weather |
Weather Information | Weather info from wttr.in |
# API Endpoint Tests
curl -kL https://devops-tw.up.railway.app/
curl -kL https://devops-tw.up.railway.app/status
curl -kL https://devops-tw.up.railway.app/pic
curl -kL https://devops-tw.up.railway.app/health
curl -kL https://devops-tw.up.railway.app/joke
curl -kL -X POST https://devops-tw.up.railway.app/echo -d '{"key":"value"}'
curl -kL https://devops-tw.up.railway.app/weather
When I first approached this DevOps assignment, I initially went with railway.app as my PaaS, inorder to develop a MVP as soon as possible and learn the concepts of devops, Once I gained the knowledge of basic DevOps, then I moved to AWS, it was rough in the beginning stages of dev, since I never used AWS before, understanding the components of aws was the biggest hurdle. But in the end I have made this MVP, Only thing left to do is moving from self-signed to CA-signed.
-
Cloud Provider Selection
- Chose AWS for its comprehensive services
- Created an AWS account
- Generated IAM user credentials
-
Local Development
- Developed a simple Flask application
- Created basic API endpoints
- Structured the application for containerization
-
Containerization
# Dockerfile creation docker build -t speakx-flask-api . # Local testing docker run -p 3000:3000 speakx-flask-api
-
Infrastructure as Code
- Used Terraform to define infrastructure
- Created security groups
- Provisioned EC2 instance
- Set up Elastic IP
- Created ECR repository
-
Deployment Strategy
- Used Docker Compose for container orchestration
- Configured Nginx as a reverse proxy
- Implemented SSL termination
- Implemented strict security group rules
- Used environment variables for sensitive data
- Ensured no hard-coded credentials
- Cloud: AWS
- Compute: EC2
- Containerization: Docker
- Orchestration: Docker Compose
- IaC: Terraform
- AWS Secrets Manager integration
- Environment-based configuration
- HTTPS-only communication
- Restricted network access
- Domain: Given in devops-tw.up.railway.app
- Approach: Simplified PaaS deployment
- Limitations: Less control, basic scalability
My initial approach to the DevOps training wheels project began with Railway.app, a Platform as a Service (PaaS) that simplifies deployment and scaling.
- Platform: Railway.app
- Deployment Method: Direct GitHub Repository Integration
- Technology Stack:
- Python Flask
- Containerized Application
-
Repository Setup
- Configured GitHub repository
- Prepared application for cloud deployment
-
Railway Configuration
- Connected GitHub repository
- Automatic build and deployment
- Simplified environment management
- Limited infrastructure control
- Basic scaling capabilities
- Reduced customization options
The move from Railway.app to AWS was driven by:
- Need for more granular infrastructure control
- Advanced security requirements
- Scalability and enterprise-level features
Aspect | Railway.app | AWS Solution |
---|---|---|
Deployment Complexity | Low | High |
Infrastructure Control | Limited | Comprehensive |
Scalability | Basic | Advanced |
Cost | Free Tier | Flexible, Pay-as-you-go |
Security Configuration | Basic | Extensive |
- π§ Declarative syntax of Terraform for provinsion
- π AWS Ecosystem, EC2, ECR, S3 Bucket, Security Groups (SG)
- π‘ Containerization using Docker and Orchestration using docker-compose
Special thanks to Railway.app for providing an initial platform for rapid development and deployment.
Special thanks to Aryan for reviewing this project and giving thoughtful insights.
Contributions are welcome! Please open an issue or submit a pull request.
GLWTS