Cloud infrastructure provisioning and management tool
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
Table of Contents
Infrustructure provisioning is a critical part of today's cloud key features . We all have used some of the most popular cloud providers to provision infrastructure, like Heroku
, AWS
, DigitalOcean
, Vercel
, Google Cloud Platform
, and others.
But what if you want to provision programmatically infrastructure by your own? How do you even code such a thing?
That's where Rubify comes in. Rubify is a cloud infrastructure provisioning tool that allows you to provision infrastructure programmatically.
Made with the sole purpose of learning how these platforms work internally, and teach myself new technologies and concepts.
Using Pulumi allows us to dinamically create AWS S3 buckets to host our code, as well as create a new AWS EC2 instance to host our application.
There's a few things you'll need before running this project:
- Have an AWS account and AWS CLI installed and configured
- Pulumi account with stack created on dev environment
- Pulumi CLI installed and configured
- Have venv installed since pulumi uses virtual environments
- Have an ssh keypair set up in PEM format
Let's install all the tools we need to get started.
- AWS CLI (Linux x86 - 64bit )
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install
For more information on AWS CLI, see AWS CLI Documentation
- Pulumi CLI
curl -fsSL https://get.pulumi.com | sh
For more information on Pulumi CLI, see Pulumi CLI Documentation
- Clone the repo
git clone https://github.com/s4nd1x/rubify.git
- Run pulumi up to create the venv folder
pulumi up
- Install the dependecies inside the venv folder
venv/bin/pip install flask requests python-dotenv venv/bin/pip install -r requirements.txt
- Create .env file inside root directory
SECRET_KEY="<random string>" PROJECT_NAME="<pulumi project name>" PULUMI_ORG="<pulumi organization name>"
- Make sure you have ssh keypair set up in PEM format
ssh-keygen -m PEM cd ~/.ssh mv id_rsa id_rsa.pem
Once you have installed all the previous requirements, you should be able to run the following commands:
- Run the app
FLASK_RUN_PORT=1337 FLASK_ENV=development venv/bin/flask run
- You should be able to access the app at the following url:
http://localhost:1337
You're all set! 🚀
This is a work in progress and I'm still learning how does Pulumi works so this are the things I'm planning to add:
- Host other types of content (images, videos, etc) not only HTML
- Be able to decide wich OS to use for the VM
- Have an ssh built-in into the web app
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE.txt
for more information.
Jorge Sanchez - @s4nd1x - [email protected]
Project Link: https://github.com/s4nd1x/rubify
- @marleneharms for showning me the original idea of the project
- @freecodecamp for the guide on which this project was built
- @sebastiancrossa for the advice on where to host the app