Compare commits

..

No commits in common. "b3607608558cb0b71d96b662df21f16e11acd728" and "02e13dfb001392509f1787f397330dbbc19f97ed" have entirely different histories.

119 changed files with 140 additions and 872 deletions

View File

@ -1,5 +0,0 @@
location /fabrica/ {
alias %%ROOT%%/images/;
autoindex on;
allow all;
}

1
.gitignore vendored
View File

@ -2,4 +2,3 @@
images/
packer_cache/
*inventory
*~

View File

@ -1,24 +0,0 @@
-----BEGIN CERTIFICATE-----
MIID+DCCAuCgAwIBAgIEYFM0nzANBgkqhkiG9w0BAQsFADCBgjELMAkGA1UEBhMC
RlIxLzAtBgNVBAoTJk1pbmlzdGVyZSBFZHVjYXRpb24gTmF0aW9uYWxlIChNRU5F
U1IpMRQwEgYDVQQLEwsxMTAgMDQzIDAxNTERMA8GA1UECxMIYWMtZGlqb24xGTAX
BgNVBAMTEENBLWlnb3IuZW9sZS5sYW4wHhcNMjEwMzE4MTEwODE3WhcNMjQwMzE4
MTEwODE3WjB/MQswCQYDVQQGEwJGUjEvMC0GA1UEChMmTWluaXN0ZXJlIEVkdWNh
dGlvbiBOYXRpb25hbGUgKE1FTkVTUikxFDASBgNVBAsTCzExMCAwNDMgMDE1MREw
DwYDVQQLEwhhYy1kaWpvbjEWMBQGA1UEAxMNaWdvci5lb2xlLmxhbjCCASIwDQYJ
KoZIhvcNAQEBBQADggEPADCCAQoCggEBAMvH59l40rzyhHvqZGPytMfXNFIc5hr8
Da6jz2G3KCHTFaHYMw6un3OSB40KwxAc6tBk3sclWFYL/4Bp0gCaYPbL5gPcgxuc
kakJ6wqv/LdCXrUfOb7w8+J/QX/UgJmTKsFT9cncBFQM4PsqLXGNzOasWZ18Tpj7
D544GUrdFQJTseC/nS0BHAWhYol7mDnXNyuCLZr3wJj7X3ILb1KxrBLGp1J1IRFf
kQxOIrL7NzZWe8PeTo8ZHYlGBDfwt5vDknC0mxShK5GZtxjrOoTDzO1fsXZsDtM+
YAUNmGDP2qVFW/7iGp8cwOG/T6/nPxgTBzX3hdJI2nsboB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T9EEjrQJFKqjYIobieQANDniLqbJ89Laa107rNoZfbGhgj1SquZ5/A2g
S4b02luUcVI7HdQ6aYG9uY91q39CMOF6k22IB11YSj/t5T9FAIGaR5Hmtj5UePFT
j3IIbkkCgYEA86Q7OT2IN1t09A/kGLzHyklN77MW2xnMdcTYRPgHotIoMk6my/9x
VI6qrcfox2JbEcWmHPjwegAAGSfg6kIGU+G0Mp0m7ML2z9l6+lPDxNcmP3mbm5u7
IyHMvIz/Sy7x4VxNwmrVqGfw9neNZ/Jhl4M2XbeD0MBjYMUqeDzCJLUCgYEA1h4R
9q9llY88fsIlA5N+s9B+0L2ur74DDsaYhKp42BPH+j531nA4ziLQ8vhbAK1iqxik
QJfoJ5iKinGfiqGQtwv+t3FPYfblQmdXNV9qjMIwWg390MJcieAXoqC84gSWK0WS
maF3Gj2d4QuUB7ddS7FhLFh+duesinhzQ1zMSrsCgYEAgTeLCXKu+d0RjBeZe90z
gP+bzBMJfi6Sl6tMoFeDhUE8fGHmaK8Tpir8LqqltIlfj29qCFenAq1ZX/4cdWGL
BZXhAi8C4/MK/3Vyma0vWQhairOuabsQZzOX6DBHfdJqCoHv47rRkj1+ONlzL7wH
MlouzUl1KZO/oSUwvxBKTzkCgYAq8JbbqOsvZi1Uomy33eGAACUeiZu5xNpqISu/
F0zq0HS/W72+tHy/4j2TLHlblmn+NA/koFI/dpj6ELVVIPebrf0kHsYzuEbb3Uug
+YStu9fkh3/KWOAkClvTEncuwIq5HNe8laQEEC1UT3UdYwmDv4vkT87025s/nc5H
yRlzNwKBgGdjN06Tr2quQJr6TKh8AisbuCOPQMeYfwVjwnEThDonQNc6+bMlDx6E
8OL1zmYsIWuNRqnIkZD1dA7VROCWYtOYZlpN1lbhGmluXEM2KmG8GZYo6G6Y4pXv
U9j9sqUW/K21BTVO2ksoQhiOW3HFdjsT7InO496L/GdKTeMqUwT0
-----END RSA PRIVATE KEY-----

View File

@ -1,90 +0,0 @@
provider "opennebula" {
endpoint = var.one_endpoint
username = var.one_user
password = var.one_pass
}
provider "dns" {
update {
server = var.dns_server
port = "53530"
key_name = var.dns_key_name
key_algorithm = var.dns_key_algo
key_secret = var.dns_key_secret
retries = 10
timeout = 300
}
}
// Production
/*
* Virtual networks
*/
resource "opennebula_virtual_network" "vnets"{
for_each = var.virtual_networks
name = each.key
vlan_id = each.value.vlan_id
permissions = "660"
bridge = var.one_vswitch
type = "ovswitch"
mtu = 1500
ar {
ar_type = each.value.adress_range.ar_type
size = each.value.adress_range.size
ip4 = each.value.adress_range.ip4
}
dns = each.value.dns
gateway = each.value.gateway
clusters = each.value.clusters
}
/*
* VIRTUAL MACHINES
*/
// Production
module "vms" {
source = "./modules/virtualMachine"
one_user = var.one_user
one_prod_ds = var.one_prod_ds
for_each = var.virtual_machines
vm_shortname = each.key
vm_fqdn = each.value.fqdn
vm_domain = var.dns_domain
dns_a_record = each.value.create_dns_a_record
cpu = each.value.cpu
vcpu = each.value.vcpu
ram = each.value.memory
vnets = opennebula_virtual_network.vnets
network_interfaces = each.value.network_interfaces
tag_labels = each.value.labels
system_image_name = each.value.disks.system.name
data_image_name = ""
system_image_source = each.value.disks.system.source
data_image_source = ""
depends = [
for dp in each.value.network_interfaces:
opennebula_virtual_network.vnets[dp.network_name].id
]
}
/* Additionnal DNS Entry
module "ber_asso_fr" {
source = "./modules/cadolesDNS"
dns_domain = "cadoles.com."
dns_a_records = var.dns_a_records
dns_cname_records = var.dns_cname_records
depends = [ module.dns.virtual_machine_shortname ]
}
*/

View File

@ -1,29 +0,0 @@
// Dependencies management
resource "null_resource" "depends_on" {
triggers = {
depends_on = join("", var.depends)
}
}
resource "dns_a_record_set" "a_records" {
for_each = var.dns_a_records
zone = var.dns_domain
name = each.key
ttl = 300
addresses = each.value
depends_on = [ null_resource.depends_on ]
}
resource "dns_cname_record" "cname_records" {
for_each = var.dns_cname_records
zone = var.dns_domain
name = each.key
cname = each.value
ttl = 300
depends_on = [ null_resource.depends_on ]
}

View File

@ -1,23 +0,0 @@
variable "dns_domain" {
description = "DNS Domain name (FQDN)"
type = string
default = "cadoles.com."
}
variable "dns_a_records" {
description = "List of dns A records to create"
type = map
default = {}
}
variable "dns_cname_records" {
description = "List of CNAME entires"
type = map
default = {}
}
variable "depends" {
description = "List of output_variables for dependences management"
type = list
default = []
}

View File

@ -1,115 +0,0 @@
// Dependencies management
resource "null_resource" "depends_on" {
triggers = {
depends_on = join("", var.depends)
}
}
// OpenNebula disk image !
resource "opennebula_image" "system" {
name = var.system_image_name
description = "System disk image"
datastore_id = var.one_prod_ds
//persistent = false
persistent = true
//lock = "MANAGE"
path = var.system_image_source
dev_prefix = "vd"
driver = "qcow2"
format = "qcow2"
permissions = "660"
group = "production"
}
resource "opennebula_image" "data" {
name = var.data_image_name
description = "Data disk image"
datastore_id = var.one_prod_ds
persistent = true
//lock = "MANAGE"
path = var.data_image_source
dev_prefix = "vd"
driver = "qcow2"
format = "qcow2"
permissions = "660"
group = "production"
count = var.data_image_name != "" ? 1 : 0
}
// OpenNebula (VM) Template definition
resource "opennebula_template" "vm_template" {
name = var.vm_shortname
cpu = var.cpu
vcpu = var.vcpu
memory = var.ram
graphics {
keymap = "fr"
listen = "0.0.0.0"
type = "VNC"
}
context = {
DNS_HOSTNAME = "yes"
NETWORK = "YES"
SSH_PUBLIC_KEY = "$USER[SSH_PUBLIC_KEY]"
USERNAME = "root"
}
disk {
image_id = opennebula_image.system.id
}
dynamic "disk" {
for_each = opennebula_image.data
content {
image_id = disk.id
}
}
//labels = var.tag_labels
dynamic "nic" {
for_each = var.network_interfaces
content {
network_id = var.vnets[nic.value.network_name].id
model = "virtio"
ip = nic.value.ip
}
}
permissions = "600"
group = "production"
depends_on = [ opennebula_image.system,
opennebula_image.data ]
}
// OpenNebula Virtual Machine
resource "opennebula_virtual_machine" "vm" {
name = var.vm_fqdn
group = "production"
timeout = 10
template_id = opennebula_template.vm_template.id
depends_on = [ opennebula_template.vm_template,
null_resource.depends_on ]
}
resource "dns_a_record_set" "vm_dns_a_record" {
count = var.dns_a_record == "yes" ? 1 : 0
zone = var.vm_domain
name = var.vm_shortname
ttl = 300
addresses = [ var.network_interfaces[0].ip ]
depends_on = [ opennebula_virtual_machine.vm ]
}
resource "dns_cname_record" "vm_dns_cname_record" {
for_each = var.dns_cname_record
zone = var.vm_domain
name = each.value
cname = "${var.vm_fqdn}."
ttl = 300
depends_on = [ opennebula_virtual_machine.vm ]
}

View File

@ -1,7 +0,0 @@
output "virtual_machine_shortname" {
value = opennebula_virtual_machine.vm.name
}
output "network_interfaces" {
value = var.network_interfaces
}

View File

@ -1,93 +0,0 @@
variable "one_user" {
description = "OpenNebula user"
type = string
}
variable "one_prod_ds" {
description = "ID du Datastore de production"
type = string
}
variable "vm_fqdn" {
description = "Virtual Machine FQDN Name"
type = string
}
variable "vm_shortname" {
description = "Virtual machine short name"
type = string
}
variable "vm_domain" {
description = "Full qualified dns domain name"
type = string
}
variable "system_image_name" {
description = "System image disk name"
type = string
}
variable "system_image_source" {
description = "Virtual Machine system image source"
type = string
}
variable "data_image_name" {
description = "Data image disk name"
type = string
}
variable "data_image_source" {
description = "Virtual Machine data disk image source"
type = string
}
variable "tag_labels" {
description = "Labels"
type = string
}
variable "network_interfaces" {
description = "Network interfaces"
type = list
}
variable "cpu" {
description = "VM CPU"
type = string
}
variable "vcpu" {
description = "VM vCPU"
type = string
}
variable "ram" {
description = "VM RAM"
type = string
}
variable "depends" {
description = "List of output_variables for dependences management"
type = list
default = []
}
variable "dns_a_record" {
description = "Create a dns A record (yes/no)"
type = string
default = "no"
}
variable "dns_cname_record" {
description = "List of CNAME for A entry"
type = map(string)
default = {}
}
variable "vnets" {
description = "OpenNebula virtual network resource"
type = map
default = {}
}

View File

@ -1,15 +0,0 @@
terraform {
required_providers {
dns = {
source = "hashicorp/dns"
}
null = {
source = "hashicorp/null"
}
opennebula = {
source = "OpenNebula/opennebula"
version = "0.3.0"
}
}
required_version = ">= 0.13"
}

View File

@ -1,4 +0,0 @@
SUNSTONE = [
DEFAULT_VIEW = "${group_default_view}",
VIEWS = "group_views"
]

View File

@ -1,12 +0,0 @@
one_endpoint = "https://myhapy.fabrica.local/RPC2"
one_user = "terra"
one_pass = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
one_vswitch = "vswitch"
one_prod_ds = "101"
image_builder_ip = "192.168.1.108"
dns_server = "192.168.5.53"
dns_domain = "fabrica.local."
cluster_id = 0
dns_key_name = "terraform.key."
dns_key_secret = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

View File

@ -1,22 +0,0 @@
dns_zones = [
{
domain = "cadoles.com",
a_records = {
hapy = [ "192.168.1.108" ],
amon = [ "192.168.1.1"]
},
cname_records = {
hapy = "virt.cadoles.com."
}
},
{
domain = "cadol.es",
a_records = {
hapy = [ "192.168.1.108" ],
amon = [ "192.168.1.1"]
},
cname_records = {
hapy = "virt.cadol.es."
}
}
]

View File

@ -1,24 +0,0 @@
virtual_networks = {
internet = {
vlan_id = "4",
adress_range = {
ar_type = "IP4",
size = "10",
ip4 = "192.168.1.28"
},
dns = "192.168.5.53",
gateway = "192.168.1.1",
clusters = [ "0" ]
},
office = {
vlan_id = "10",
adress_range = {
ar_type = "IP4",
size = "30",
ip4 = "192.168.10.100"
},
dns = "192.168.5.53",
gateway = "192.168.10.254",
clusters = [ "0" ]
}
}

View File

@ -1,43 +0,0 @@
virtual_machines = {
amon = {
fqdn = "amon.fabrica.local",
domain = "fabrica.local",
create_dns_a_record = "no",
cpu = "0.4",
vcpu = "4",
memory = "4096",
network_interfaces = [
{ network_name = "internet", ip = "192.168.1.3" },
{ network_name = "office", ip = "192.168.10.254" }
],
labels = "Production, Amon, Infra, Backup, EOLE",
disks = {
system = {
name = "prod-amon-static",
source = "http://localhost/fabrica/infra/production/amon.fabrica.local/system/amon.fabrica.local.img"
}
}
},
scribe = {
fqdn = "scribe.fabrica.local",
domain = "fabrica.local",
create_dns_a_record = "no",
cpu = "0.4",
vcpu = "4",
memory = "4096",
network_interfaces = [
{ network_name = "office", ip = "192.168.10.200" }
],
labels = "Production, Scribe, Infra, Backup, EOLE",
disks = {
system = {
name = "prod-scribe-static",
source = "http://localhost/fabrica/infra/production/scribe.fabrica.local/system/scribe.fabrica.local.img"
}
}
}
}

View File

@ -1,82 +0,0 @@
/*
* Variables
*/
variable "one_endpoint" {
description = "OpenNebula endpoint"
type = string
}
variable "one_user" {
description = "OpenNebula user"
type = string
}
variable "one_pass" {
description = "OpenNebula password"
type = string
}
variable "one_vswitch" {
description = "OpenvSwitch bridge name"
type = string
}
variable "dns_server" {
description = "DNS Server IP"
type = string
}
variable "cluster_id" {
description = "Cadoles ONE cluster ID"
type = string
}
variable "one_prod_ds" {
description = "ID du Datastore de production"
type = string
}
variable "dns_domain" {
description = "DNS Full qualified domain"
type = string
}
variable "dns_key_name" {
description = "DDNS Key name"
type = string
}
variable "dns_key_algo" {
description = "DDNS Key algorithm"
type = string
default = "hmac-sha256"
}
variable "dns_key_secret" {
description = "DDNS Key secret"
type = string
}
variable "dns_zones" {
description = "DNS Zone description"
type = list
default = []
}
variable "image_builder_ip" {
description = "Image builder IP"
type = string
default = "192.168.5.251"
}
variable "virtual_networks" {
description = "OpenNebula virtual networks definition"
type = map
default = {}
}
variable "virtual_machines" {
description = "OpenNebula virtual machines definition"
type = map
default = {}
}

View File

@ -1,11 +0,0 @@
terraform {
required_providers {
dns = {
source = "hashicorp/dns"
}
opennebula = {
source = "opennebula/opennebula"
}
}
required_version = ">= 0.13"
}

View File

@ -1,41 +1,2 @@
# 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"
``` cd /srv/fabrica
mkdir -p build/eole.lan/develop
```
#### You first receipe ... let's say an eolebase module.

1
build
View File

@ -1 +0,0 @@
./.packer/recipes/infra/

1
deploy
View File

@ -1 +0,0 @@
./.terraform/tfvars

134
fabrica
View File

@ -1,10 +1,9 @@
#!/bin/bash
WORKDIR="./.terraform"
WORKDIR="./terraform"
TERRA="terraform"
PACKER_ROOT="./.packer"
[ -f /etc/lsb-release ] && source /etc/lsb-release
VAR_FILE="main.tfvars"
PACKER_ROOT="./packer"
# FIXME
function needGitPull()
@ -14,94 +13,6 @@ function needGitPull()
return ${diff}
}
## Install & Uninstall ##
function install_hashicorp_tools()
{
packer_version="1.6.1"
terraform_version="0.14.3"
ansible_version="2.9.19"
if [[ ${DISTRIB_ID} == "ManjaroLinux" ]]
then
pacman -Syq make ansible terraform packer --noconfirm
return ${?}
elif [[ ${DISTRIB_ID} == "Ubuntu" ]]
then
apt-get update
apt-get -y install software-properties-common make
gpg_key_url="https://apt.releases.hashicorp.com/gpg"
curl -fsSL ${gpg_key_url} | apt-key add -
apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main"
apt-add-repository --yes --update ppa:ansible/ansible
apt-get update
apt-get -y install --allow-downgrades ansible=${ansible_version} terraform=${terraform_version} packer=${packer_version}
return ${?}
fi
}
function setup_nginx()
{
root=${1}
if [ -d /etc/nginx/web.d ]
then
sed -i -e "s!%%ROOT%%!${root}!g" ${root}/.configs/nginx/fabrica.conf
ln -s ${root}/.configs/nginx/fabrica.conf /etc/nginx/web.d/
echo "Don't forget to restart nginx"
fi
return 0
}
function install_fabrica()
{
root=${1}
[ ! -d ${root} ] && mkdir -p $root
cp -rp * ${root}
cp -rp .packer ${root}
cp -rp .terraform ${root}
cp -rp .configs ${root}
return ${?}
}
function install()
{
ROOT=${2}
ret=0
if [[ -z ${ROOT} ]]
then
echo "You need to provide an installation directory as paramter"
echo "./fabrica install /srv/fabrica"
return 1
fi
if [[ -e ${ROOT}/.ist ]]
then
echo "Flag file ${ROOT}/.ist exists !"
echo " ==> Fabrica is allready installed !"
echo "Nothing to do !"
return 0
fi
install_hashicorp_tools
ret=$((ret+${?}))
install_fabrica ${ROOT}
ret=$((ret+${?}))
setup_nginx ${ROOT}
ret=$((ret+${?}))
if [ ${ret} -eq 0 ]
then
touch ${ROOT}/.ist
fi
return ${ret}
}
## TERRAFORM ##
# Run Terraform command with the correct options
function trun()
{
#needGitPull
@ -112,43 +23,31 @@ function trun()
echo "--> Git pull needed !"
return 1
fi
VAR_FILES=$(ls tfvars/*.tfvars)
OPTS=""
for fl in ${VAR_FILES}
do
OPTS="${OPTS} -var-file ${fl}"
done
${TERRA} ${1} ${OPTS}
${TERRA} ${1} -var-file ${VAR_FILE}
res=${?}
cd -
return ${res}
}
# Run terraform plan
function plan()
{
trun plan
return $?
}
# Run terraform apply
function apply()
{
trun apply
return $?
}
# Run terraform destroy
function destroy()
{
trun destroy
return $?
}
# Run terraform taint
function taint()
{
target=$1
@ -156,38 +55,33 @@ function taint()
cd ${WORKDIR}
$TERRA taint module.vms[${resource}].opennebula_template.vm_template
$TERRA taint module.vms[${resource}].opennebula_virtual_machine.vm
$TERRA taint module.vms[${resource}].opennebula_image.system
$TERRA taint module.${resource}.opennebula_template.vm_template
$TERRA taint module.${resource}.opennebula_virtual_machine.vm
$TERRA taint module.${resource}.opennebula_image.system
cd -
}
# Run terraform taint for all resources
function taint_all()
{
target=$1
resource=$2
cd ${WORKDIR}
$TERRA taint module.vms[${resource}].opennebula_template.vm_template
$TERRA taint module.vms[${resource}].opennebula_virtual_machine.vm
$TERRA taint module.vms[${resource}].opennebula_image.system
$TERRA taint module.vms[${resource}].opennebula_image.data
$TERRA taint module.${resource}.opennebula_template.vm_template
$TERRA taint module.${resource}.opennebula_virtual_machine.vm
$TERRA taint module.${resource}.opennebula_image.system
$TERRA taint module.${resource}.opennebula_image.data
cd -
}
# Run terraform init
function init()
{
trun init
return ${?}
}
## PACKER ##
# Run packer build
function build()
{
target=$2
@ -197,10 +91,10 @@ function build()
return ${?}
}
# List available recipes
function recipes()
function publish()
{
echo "Need to be done"
target=$2
echo "FIXME for publish"
}
$1 $@

1
images
View File

@ -1 +0,0 @@
./.packer/images

View File

@ -43,17 +43,17 @@
- name: Adding EOLE main repository
apt_repository:
repo: deb [arch=amd64] http://eole.ac-dijon.fr/eole eole-{{ EOLE_VERSION }} main cloud
repo: deb [arch=amd64] http://eole.ac-dijon.fr/eole eole-2.7.2 main cloud
state: present
- name: Adding EOLE security repository
apt_repository:
repo: deb [arch=amd64] http://eole.ac-dijon.fr/eole eole-{{ EOLE_VERSION }}-security main cloud
repo: deb [arch=amd64] http://eole.ac-dijon.fr/eole eole-2.7.2-security main cloud
state: present
- name: Adding EOLE updates repository
apt_repository:
repo: deb [arch=amd64] http://eole.ac-dijon.fr/eole eole-{{ EOLE_VERSION }}-updates main cloud
repo: deb [arch=amd64] http://eole.ac-dijon.fr/eole eole-2.7.2-updates main cloud
state: present
- name: Update cache
@ -65,16 +65,6 @@
http_proxy: "{{ http_proxy }}"
https_proxy: "{{ https_proxy }}"
- name: Install chromium browser on 2.7.2
apt:
name: chromium-browser
environment:
HTTP_PROXY: "{{ http_proxy }}"
HTTPS_PROXY: "{{ https_proxy }}"
http_proxy: "{{ http_proxy }}"
https_proxy: "{{ https_proxy }}"
when: EOLE_VERSION == "2.7.2"
- name: Install eole-server and eole-exim-pkg
apt:
name: eole-server,eole-exim-pkg

View File

@ -0,0 +1,30 @@
-----BEGIN CERTIFICATE-----
MIIFHzCCBAegAwIBAgISBCjkb2j6sMEhSJmFWzQLY9ZFMA0GCSqGSIb3DQEBCwUA
MDIxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBFbmNyeXB0MQswCQYDVQQD
EwJSMzAeFw0yMTAyMTcxMjA3MTZaFw0yMTA1MTgxMjA3MTZaMBgxFjAUBgNVBAMM
DSouYmVyLmFzc28uZnIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC4
WWRNeZeda6tJdMoq2BaVTTn9dPxv7PXmMAbyV4BBF0OjNiJiWcMUtTR2UEmnVLzD
gaIs09jwsz/ONgjlEjM0t3bUOX6DiZg5GCE454JzMNSJAbiBTmCIQmPK3G/T6ZCG
xCIIVVhBQ6IYZjZWVnULtwtTy4k4Ib8lD0XHZKo7vX5+2pycXAB0ndK8UoEDJf8L
d7OatFaNC4J3/D3qUvNVQufGUgxZPp5ETKSEDnxrl67A/coea54pP73cHyArdL97
QRgT0UAT2Nuwn/It6a5xdE/5gl24RqwjN3XivgKyRhA5UeHw4tQBWIi6mou9Ttt0
ky16vAsXWjt1OXxIfi8ZAgMBAAGjggJHMIICQzAOBgNVHQ8BAf8EBAMCBaAwHQYD
VR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAwGA1UdEwEB/wQCMAAwHQYDVR0O
BBYEFIPQnxhiMLua8dlOGgyjElFFSq9JMB8GA1UdIwQYMBaAFBQusxe3WFbLrlAJ
QOYfr52LFMLGMFUGCCsGAQUFBwEBBEkwRzAhBggrBgEFBQcwAYYVaHR0cDovL3Iz
Lm8ubGVuY3Iub3JnMCIGCCsGAQUFBzAChhZodHRwOi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lisiiOiziIFpeRjOQ6JEqgt+ro0yTKksHX54ti0yHL2QFi8acM
wXHTEHNo2S22DAe1fbUQuwbYzexxdscgqK+u2OBTQb9Ji7SzyMfPRZ5QdgRrri83
1Fo7+N86TM0CgYAB1Jh+rHX5LbI5WHA09pQ43lTRTilPqPV4Y8qvAtCP5hkc0GLo
yqAbxTrvW0IYGXwSbKflTt00mQ4fTBIBTI1gFpQJ+/syLTrE2/se5ED3PYkWcwHq
98Gu0d6Osm7B25lvEKhpcoKDauJPoqvIuQdT3v+9K9JSbIUIAx2AAX13HQKBgECN
ozImCEDcDJGzKzs+snhybRXx0qMLiuS6O7MhbZouUrYUJJ6AGh6cpakRo55D1yhj
zXylwYNTiLsTlJ/iTc5qU1n6PHvPKeyqlW4/ddh3SVuft2u0OmqMCw/RolJDQs2I
8Yq/8XDzvMt96jn+JG4HlFqbuzO8pfizogPIYo45AoGBAIkCD7iW7TMI38npwgbt
nnA/DiMdNorsUzp/zQdzGb4QGGldVSsIk+sgJkNMAMC9zJ2ih4jh2M/Lr1N3FsOC
PVReoeF9/PMjy0Hbdyyzd6XQhW+KLiyibgwMkdRYrAD0jXaSgDnwzIff2aPS1n/m
7eRMhYiUVDxVVO8REWVlEmlr
-----END PRIVATE KEY-----

View File

@ -23,7 +23,6 @@
"iso_checksum": "none",
"disk_image": true,
"format": "qcow2",
"vnc_bind_address": "0.0.0.0",
"disk_size": "{{ user `image_size` }}",
"ssh_username": "root",
"ssh_password": "cadoles",
@ -31,13 +30,17 @@
"accelerator": "kvm",
"net_device": "virtio-net",
"disk_interface": "virtio",
"ssh_wait_timeout": "45m",
"ssh_wait_timeout": "5m",
"boot_wait": "5s",
"output_directory": "{{ user `output_dir` }}",
"vm_name": "{{ user `image_name` }}.img",
"headless": true,
"cpus": "2",
"memory" : "4096"
"qemuargs": [
[
"-m",
"2048"
]
]
}
],
"provisioners": [
@ -64,22 +67,12 @@
{
"type": "ansible",
"playbook_file": "{{user `eole_playbooks`}}/eole.yml",
"extra_arguments": [
"--extra-vars",
"VM_NAME={{ user `vm_name` }} EOLE_VERSION={{ user `eole_version` }}",
"--extra-vars",
"HTTP_PROXY={{ user `HTTP_PROXY` }} HTTPS_PROXY={{ user `HTTPS_PROXY` }} http_proxy={{ user `http_proxy` }} https_proxy={{ user `https_proxy` }}"
]
"extra_arguments": [ "-vvvv", "--extra-vars", "VM_NAME={{ user `vm_name` }} HTTP_PROXY={{ user `HTTP_PROXY` }} HTTPS_PROXY={{ user `HTTPS_PROXY` }} http_proxy={{ user `http_proxy` }} https_proxy={{ user `https_proxy` }}"]
},
{
"type":"ansible",
"playbook_file":"{{ user `eole_playbooks` }}/provision.yml",
"extra_arguments": [
"--extra-vars",
"VM_NAME={{ user `vm_name` }} EOLE_VERSION={{ user `eole_version` }}",
"--extra-vars",
"HTTP_PROXY={{ user `HTTP_PROXY` }} HTTPS_PROXY={{ user `HTTPS_PROXY` }} http_proxy={{ user `http_proxy` }} https_proxy={{ user `https_proxy` }}"
]
"extra_arguments": [ "--extra-vars", "VM_NAME={{ user `vm_name` }} HTTP_PROXY={{ user `HTTP_PROXY` }} HTTPS_PROXY={{ user `HTTPS_PROXY` }} http_proxy={{ user `http_proxy` }} https_proxy={{ user `https_proxy` }}"]
}
],
"post-processors": [

Some files were not shown because too many files have changed in this diff Show More