GitHub: devops_tw
Endpoint | Description | Method | Response |
---|---|---|---|
/ | Home Endpoint | GET | Welcome message |
/status | Application Status | GET | JSON status |
/pic | Random Image Retrieval | GET | Static image |
/health | Health Check | GET | Health status |
/joke | Joke Endpoint | GET | A random joke |
/echo | Echo Endpoint | POST | Echoes the input JSON |
/weather | Weather Information | GET | 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 in order to develop an MVP as soon as possible and learn the concepts of DevOps. Once I gained the knowledge of basic DevOps, I moved to AWS. It was rough in the beginning stages of development since I had never used AWS before. Understanding the components of AWS was the biggest hurdle. But in the end, I created this MVP. The only thing left to do is moving from self-signed to CA-signed SSL certificate.
# Dockerfile creation
docker build -t devops_tw-flask-api .
# Local testing
docker run -p 3000:3000 devops_tw-flask-api
Infrastructure Components:
Initial Project: Domain: shavok.up.railway.app
Approach:Developing on Railway was super simple, since it took care of most of things, ranging from default secure environment variable to auto-detecting Dockerfile and deploying it.
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 |