Cloud architecture for developers personal projects.
source link: https://niradler.com/personal-experiment-cloud-architecture-for-developers/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
In this post i'm going to describe my personal preference for cloud host for personal projects and learning. As a rule, I try to use industry leading tools and not dev only products.
In the architecture diagram above, I described how I used AWS services to host my project. This example match for most of the scenarios I had.
The first scenario I want to talk about is how to setup a personal docker hosting, to run and manage dockers on an ec2 machine on AWS. In my solution, I wanted to get flexibility and management console so I can run and stop container easily, also I didn't want to get out of docker eco-system, so the options I had are docker swarm or docker-machine. I choose docker-machine because its super simple to set up and in the development process I don't need to use complex tools to deploy and manage the docker containers.
The setup is super simple with the docker-machine CLI, checkout this link for more details.
docker-machine create --driver amazonec2
After you finish to set up the machine, you can configure a portainer container on this instance and to configure it to listen to port 80. Also, you need to make sure port 80 is open on the instance security group - don't forget to backup the new created ssh key. Now, to get easy access, if you have a domain on AWS Route53, I added a record to point to the instance ip, (for advance security i will set up openssl and grant access only on https), now you can use this url to access the portainer management console and manage dockers, you can also pull dockers from docker hub. I suggest you to practice and push docker containers to docker hub.
To summarise the first option, this can handle basically everything. After i finished the set up I used spotinst to create a cheaper clone and replace the old instance with a new reserved instance (you can wait with this if you are in the free tier) I will also suggest to set a budget alarm to notify you when you reach a certain price. With this option you can use all kinds of applications when they are packed as a docker container.
The second scenario, is to use serverless and per use services to host projects with low volume very cheaply (most of the time they are free), for example, the AWS lambda service to host function and pay per invocation. In the diagram above I demonstrate how I hosted the devresources.site project on AWS, I'm storing the client assets on the S3 and serve it with Cloudfront CDN. The server logic is using AWS lambda and accessed with API Gateway.
In conclusion, don't be afraid to use cloud services. Using this kind of tools is the best way to learn about cloud and development and to give others access to your projects, make sure to do this responsibly - cloud services can be costly if not managed correctly.
Recommend
-
31
Android architecture evolves as all of our technical skills do. After a couple of years as Android Developer I found a good architecture for potentially big projects. This by the way is the most important thing t...
-
61
“Please pray for my son,” is my mother’s go-to phrase whenever she comes to visit my condo in San Diego. My home lab is strung up with a web of audio, visual, and power cords. Wandering eyes will find themselves crossing...
-
5
Using Azure Slots and GitHub for Personal Projects
-
8
Personal Staging Environment for Micro-Services ArchitectureMicro-Services Architecture is a method of developing applications as independently deployable, small, modular services in which each service runs a unique proces...
-
6
A Docker Stack for Personal and Team Projects in Python --- Part 1 I started using Docker in early 2016. After learning it for a month or two, I have never done code development outside of Docker again. My Docker workflow...
-
3
A Docker Stack for Personal and Team Projects in Python --- Part 2 Part 1 of this mini-series gave an overview of my Docker stack for Python projects. In thi...
-
5
A Docker Stack for Personal and Team Projects in Python --- Part 3 Part 1 and Part 2 of this...
-
1
-
5
Using AWS Oganizations for learning and personal projects If you working on many projects deployed to AWS over time, sometimes it can become more difficult to track what resources are where and what relates to what. Tagging...
-
4
How to Learn Effectively with Your Personal Programming ProjectsJanuary 13th 2022 new story7
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK