|Philippe Caseiro 3822efe2a9||2 years ago|
|.configs/nginx||2 years ago|
|.packer||2 years ago|
|.terraform||2 years ago|
|.gitignore||2 years ago|
|README.md||2 years ago|
|build||2 years ago|
|deploy||2 years ago|
|fabrica||2 years ago|
|images||2 years ago|
Build your infrastructure from scratch with Eole/Hâpy Packer and Terraform
The idea :
The goal of this project is to provide a simple way to build a complete infrastructure from scratch with EOLE/Hâpy, packer and Terraform.
How it works ?
It's quite simple actualy, packer will build your virtual machine images and terraform will deploy them on your hapy server.
The "fabrica" command provides every thing you need, it calls the packer and the terraform tool with the correct options to make things possible.
This project contains basic recipes for alpine linux, Ubuntu and Eole images. You will need to provide your own recipes if you want to have custom images. So you will need to learn how packer works and witch tools fabrica offers you.
First you will need to decide what is your dns domain, fabrica provides exemples for two domains "cadoles.com" and "eole.local". Then you can provide recipes for your "environement" here we use "production" but it can be whatever you want. You can find this exemple in the "build" directory, this is actually a symlink to make things nicer to the eye, if you want to dig into fabrica you can find all packer stuff in the hidden directory ".packer".
Once your images are ready you can describe your infrastructure in the "deploy" zone. but first things first ! Let's install fabrica and talk about the Build.
We assume you allready have a running Hâpy server.
Copy the source code somewhere on your server and run the command
./fabrica install /srv/fabrica
This will install all the needed tools (terraform and packer) with the correct versions for fabrica (Don't install them yourself or if you do find the correct versions in fabrica script). And it will copy the fabrica repository in the provided root direcytory "/srv/fabrica"
Building your images
Build for your domain !
Create a directory with your domain name, let's say "eole.lan", let's say you have only one environement "develop"
mkdir -p build/eole.lan/develop