Compare commits
25 Commits
b360760855
...
d1484d3cb9
Author | SHA1 | Date |
---|---|---|
Philippe Caseiro | d1484d3cb9 | |
Philippe Caseiro | eec6aa53da | |
Philippe Caseiro | 7ffb4d1af4 | |
Philippe Caseiro | 84fc1b22d0 | |
Philippe Caseiro | 52107e134e | |
Philippe Caseiro | dc19682f65 | |
Philippe Caseiro | f6f9af8dc2 | |
Philippe Caseiro | e09dd647f3 | |
Philippe Caseiro | 76b7c779bc | |
Philippe Caseiro | d5c900d721 | |
Philippe Caseiro | 003e1e974c | |
Philippe Caseiro | af2a938648 | |
Philippe Caseiro | 4a710369ec | |
Philippe Caseiro | dbe04251fe | |
Philippe Caseiro | c1317b00f3 | |
Philippe Caseiro | 7c61208297 | |
Philippe Caseiro | d3f48aef8c | |
Philippe Caseiro | 71a50c8fa3 | |
Philippe Caseiro | de1dc7e0d7 | |
Asgard | eebbdc81d8 | |
Philippe Caseiro | 5a898ac10c | |
Philippe Caseiro | e4d4f10181 | |
Philippe Caseiro | 3c69897bc0 | |
Philippe Caseiro | f1eb29b0ad | |
Philippe Caseiro | 3851c247a3 |
|
@ -0,0 +1,5 @@
|
|||
location /fabrica/ {
|
||||
alias %%ROOT%%/images/;
|
||||
autoindex on;
|
||||
allow all;
|
||||
}
|
|
@ -2,3 +2,4 @@
|
|||
images/
|
||||
packer_cache/
|
||||
*inventory
|
||||
*~
|
||||
|
|
|
@ -43,17 +43,17 @@
|
|||
|
||||
- name: Adding EOLE main 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
|
||||
|
||||
- name: Adding EOLE security 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
|
||||
|
||||
- name: Adding EOLE updates 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
|
||||
|
||||
- name: Update cache
|
||||
|
@ -65,6 +65,16 @@
|
|||
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
|
|
@ -23,6 +23,7 @@
|
|||
"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",
|
||||
|
@ -30,17 +31,13 @@
|
|||
"accelerator": "kvm",
|
||||
"net_device": "virtio-net",
|
||||
"disk_interface": "virtio",
|
||||
"ssh_wait_timeout": "5m",
|
||||
"ssh_wait_timeout": "45m",
|
||||
"boot_wait": "5s",
|
||||
"output_directory": "{{ user `output_dir` }}",
|
||||
"vm_name": "{{ user `image_name` }}.img",
|
||||
"headless": true,
|
||||
"qemuargs": [
|
||||
[
|
||||
"-m",
|
||||
"2048"
|
||||
]
|
||||
]
|
||||
"cpus": "2",
|
||||
"memory" : "4096"
|
||||
}
|
||||
],
|
||||
"provisioners": [
|
||||
|
@ -67,12 +64,22 @@
|
|||
{
|
||||
"type": "ansible",
|
||||
"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",
|
||||
"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": [
|
|
@ -27,6 +27,7 @@
|
|||
"iso_urls": [ "{{ user `ubuntu_mirror` }}{{ user `ubuntu_codename` }}-updates/main/installer-amd64/current/images/netboot/mini.iso" ],
|
||||
"ssh_username": "{{ user `ssh_username` }}",
|
||||
"ssh_password": "{{ user `ssh_password` }}",
|
||||
"vnc_bind_address": "0.0.0.0",
|
||||
"ssh_wait_timeout": "60m",
|
||||
"headless": "{{ user `headless` }}",
|
||||
"output_directory": "{{ template_dir }}/../../../images/ubuntu/18.04",
|
|
@ -49,6 +49,8 @@ systemctl disable apt-daily
|
|||
systemctl disable apt-daily.timer
|
||||
systemctl disable apt-daily-upgrade
|
||||
|
||||
apt-get install -y qemu-guest-agent
|
||||
|
||||
# Cleanup
|
||||
rm -f "${ONE_CONTEXT_PACKAGE_DEST}"
|
||||
apt-get -y clean
|
|
@ -22,7 +22,7 @@ provider "dns" {
|
|||
/*
|
||||
* Virtual networks
|
||||
*/
|
||||
resource "opennebula_virtual_network" "vnet"{
|
||||
resource "opennebula_virtual_network" "vnets"{
|
||||
for_each = var.virtual_networks
|
||||
name = each.key
|
||||
vlan_id = each.value.vlan_id
|
||||
|
@ -60,7 +60,7 @@ module "vms" {
|
|||
vcpu = each.value.vcpu
|
||||
ram = each.value.memory
|
||||
|
||||
vnets = opennebula_virtual_network.vnet
|
||||
vnets = opennebula_virtual_network.vnets
|
||||
network_interfaces = each.value.network_interfaces
|
||||
|
||||
tag_labels = each.value.labels
|
||||
|
@ -71,8 +71,9 @@ module "vms" {
|
|||
system_image_source = each.value.disks.system.source
|
||||
data_image_source = ""
|
||||
|
||||
depends = [
|
||||
opennebula_virtual_network.vnet[each.value.depends[0]].id
|
||||
depends = [
|
||||
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
Loading…
Reference in New Issue