Go to file
Philippe Caseiro dc19682f65 Adding ansible install for manjaro to 2021-03-24 10:43:27 +01:00
.configs/nginx Cleanup configs directory 2021-03-23 12:06:48 +01:00
.packer Update vm specs for eolebase build 2021-03-23 17:30:50 +01:00
.terraform Manage network dependencies for virtual machines 2021-03-24 10:14:16 +01:00
.gitignore Update gitignore 2021-03-23 12:13:37 +01:00
README.md Update README 2021-03-23 12:02:22 +01:00
build Cleanup repository 2021-03-23 11:31:41 +01:00
deploy Cleanup repository 2021-03-23 11:31:41 +01:00
fabrica Adding ansible install for manjaro to 2021-03-24 10:43:27 +01:00
images Adding images link 2021-03-23 13:29:00 +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.