Compare commits

...

25 Commits

Author SHA1 Message Date
Philippe Caseiro d1484d3cb9 FIXUP fix prov 2021-03-24 12:08:33 +01:00
Philippe Caseiro eec6aa53da Update ubuntu recipe vnc_bind_address 2021-03-24 11:54:40 +01:00
Philippe Caseiro 7ffb4d1af4 Update ubuntu basic image add ing qemu-guest-agent package 2021-03-24 11:52:21 +01:00
Philippe Caseiro 84fc1b22d0 Update eole playbook for multi-version support 2021-03-24 11:41:40 +01:00
Philippe Caseiro 52107e134e Update vnc_bind_adresse for eolebase 2021-03-24 11:11:40 +01:00
Philippe Caseiro dc19682f65 Adding ansible install for manjaro to 2021-03-24 10:43:27 +01:00
Philippe Caseiro f6f9af8dc2 Adding ansible install 2021-03-24 10:43:13 +01:00
Philippe Caseiro e09dd647f3 Update install for Ubuntu target 2021-03-24 10:29:10 +01:00
Philippe Caseiro 76b7c779bc Manage network dependencies for virtual machines 2021-03-24 10:14:16 +01:00
Philippe Caseiro d5c900d721 Update vm specs for eolebase build 2021-03-23 17:30:50 +01:00
Philippe Caseiro 003e1e974c Ajust ssh timeout for eolebase 2.7.2 2021-03-23 16:37:38 +01:00
Philippe Caseiro af2a938648 Updating packer version 2021-03-23 14:27:12 +01:00
Philippe Caseiro 4a710369ec Updating packer version 2021-03-23 14:25:54 +01:00
Philippe Caseiro dbe04251fe Adding images link 2021-03-23 13:29:00 +01:00
Philippe Caseiro c1317b00f3 Update gitignore 2021-03-23 12:13:37 +01:00
Philippe Caseiro 7c61208297 Fix terraform package version for ubuntu 2021-03-23 12:11:54 +01:00
Philippe Caseiro d3f48aef8c Fix terraform package version for ubuntu 2021-03-23 12:10:23 +01:00
Philippe Caseiro 71a50c8fa3 Fix fabrica install command 2021-03-23 12:09:09 +01:00
Philippe Caseiro de1dc7e0d7 Cleanup configs directory 2021-03-23 12:06:48 +01:00
Asgard eebbdc81d8 Adding missing nginx config 2021-03-23 12:05:03 +01:00
Philippe Caseiro 5a898ac10c Fix terraform and packer versions 2021-03-23 12:02:36 +01:00
Philippe Caseiro e4d4f10181 Update README 2021-03-23 12:02:22 +01:00
Philippe Caseiro 3c69897bc0 Adding basic exemples for terraform infrastructure 2021-03-23 11:33:27 +01:00
Philippe Caseiro f1eb29b0ad Cleanup repository 2021-03-23 11:31:41 +01:00
Philippe Caseiro 3851c247a3 Adding self installation command for fabrica 2021-03-23 11:31:41 +01:00
117 changed files with 199 additions and 50 deletions

View File

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

1
.gitignore vendored
View File

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

View File

@ -43,17 +43,17 @@
- name: Adding EOLE main repository - name: Adding EOLE main repository
apt_repository: apt_repository:
repo: deb [arch=amd64] http://eole.ac-dijon.fr/eole eole-2.7.2 main cloud repo: deb [arch=amd64] http://eole.ac-dijon.fr/eole eole-{{ EOLE_VERSION }} main cloud
state: present state: present
- name: Adding EOLE security repository - name: Adding EOLE security repository
apt_repository: apt_repository:
repo: deb [arch=amd64] http://eole.ac-dijon.fr/eole eole-2.7.2-security main cloud repo: deb [arch=amd64] http://eole.ac-dijon.fr/eole eole-{{ EOLE_VERSION }}-security main cloud
state: present state: present
- name: Adding EOLE updates repository - name: Adding EOLE updates repository
apt_repository: apt_repository:
repo: deb [arch=amd64] http://eole.ac-dijon.fr/eole eole-2.7.2-updates main cloud repo: deb [arch=amd64] http://eole.ac-dijon.fr/eole eole-{{ EOLE_VERSION }}-updates main cloud
state: present state: present
- name: Update cache - name: Update cache
@ -65,6 +65,16 @@
http_proxy: "{{ http_proxy }}" http_proxy: "{{ http_proxy }}"
https_proxy: "{{ https_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 - name: Install eole-server and eole-exim-pkg
apt: apt:
name: eole-server,eole-exim-pkg name: eole-server,eole-exim-pkg

View File

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

View File

@ -27,6 +27,7 @@
"iso_urls": [ "{{ user `ubuntu_mirror` }}{{ user `ubuntu_codename` }}-updates/main/installer-amd64/current/images/netboot/mini.iso" ], "iso_urls": [ "{{ user `ubuntu_mirror` }}{{ user `ubuntu_codename` }}-updates/main/installer-amd64/current/images/netboot/mini.iso" ],
"ssh_username": "{{ user `ssh_username` }}", "ssh_username": "{{ user `ssh_username` }}",
"ssh_password": "{{ user `ssh_password` }}", "ssh_password": "{{ user `ssh_password` }}",
"vnc_bind_address": "0.0.0.0",
"ssh_wait_timeout": "60m", "ssh_wait_timeout": "60m",
"headless": "{{ user `headless` }}", "headless": "{{ user `headless` }}",
"output_directory": "{{ template_dir }}/../../../images/ubuntu/18.04", "output_directory": "{{ template_dir }}/../../../images/ubuntu/18.04",

View File

@ -49,6 +49,8 @@ systemctl disable apt-daily
systemctl disable apt-daily.timer systemctl disable apt-daily.timer
systemctl disable apt-daily-upgrade systemctl disable apt-daily-upgrade
apt-get install -y qemu-guest-agent
# Cleanup # Cleanup
rm -f "${ONE_CONTEXT_PACKAGE_DEST}" rm -f "${ONE_CONTEXT_PACKAGE_DEST}"
apt-get -y clean apt-get -y clean

View File

@ -22,7 +22,7 @@ provider "dns" {
/* /*
* Virtual networks * Virtual networks
*/ */
resource "opennebula_virtual_network" "vnet"{ resource "opennebula_virtual_network" "vnets"{
for_each = var.virtual_networks for_each = var.virtual_networks
name = each.key name = each.key
vlan_id = each.value.vlan_id vlan_id = each.value.vlan_id
@ -60,7 +60,7 @@ module "vms" {
vcpu = each.value.vcpu vcpu = each.value.vcpu
ram = each.value.memory ram = each.value.memory
vnets = opennebula_virtual_network.vnet vnets = opennebula_virtual_network.vnets
network_interfaces = each.value.network_interfaces network_interfaces = each.value.network_interfaces
tag_labels = each.value.labels tag_labels = each.value.labels
@ -71,8 +71,9 @@ module "vms" {
system_image_source = each.value.disks.system.source system_image_source = each.value.disks.system.source
data_image_source = "" data_image_source = ""
depends = [ depends = [
opennebula_virtual_network.vnet[each.value.depends[0]].id for dp in each.value.network_interfaces:
opennebula_virtual_network.vnets[dp.network_name].id
] ]
} }

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