Go to file
Philippe Caseiro 3822efe2a9 Adding pause before ansible provisionning for other EOLE recipes 2021-03-29 10:39:31 +02:00
.configs/nginx Adding self installation command for fabrica 2021-03-25 15:23:12 +01:00
.packer Adding pause before ansible provisionning for other EOLE recipes 2021-03-29 10:39:31 +02:00
.terraform Adding self installation command for fabrica 2021-03-25 15:23:12 +01:00
.gitignore Adding self installation command for fabrica 2021-03-25 15:23:12 +01:00
README.md Adding self installation command for fabrica 2021-03-25 15:23:12 +01:00
build Adding self installation command for fabrica 2021-03-25 15:23:12 +01:00
deploy Adding self installation command for fabrica 2021-03-25 15:23:12 +01:00
fabrica Adding self installation command for fabrica 2021-03-25 15:23:12 +01:00
images Adding self installation command for fabrica 2021-03-25 15:23:12 +01:00

README.md

Fabrica

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.

Install

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

You first receipe ... let's say an eolebase module.