-Subproject commit 15aba27a45f98edb33890daa3712c6a4371b2947
+Subproject commit 626eb9c0fbfd8cbc8115aacfa21ef07f55695d54
yum:
name:
- perl-XML-XPath
- - python-pip
- crudini
state: present
become: true
- name: Installing non-baseline requirements
yum:
name:
- - deltarpm
- - python
- - python-crypto
- - python-devel
- - python-lxml
- - python-setuptools
- libxml2-devel
- libxslt-devel
- libffi-devel
yum:
name:
- perl-XML-XPath
- - python-pip
- crudini
state: present
become: true
- name: Install non-baseline requirements
yum:
name:
- - deltarpm
- - python
- - python-crypto
- - python-devel
- - python-lxml
- - python-setuptools
- libxml2-devel
- libxslt-devel
- libffi-devel
--- /dev/null
+../common-packer/provision/local-windows-builder.yaml
\ No newline at end of file
"ANSIBLE_ROLES_PATH={{user `ansible_roles_path`}}",
"ANSIBLE_CALLBACK_WHITELIST=profile_tasks",
"ANSIBLE_STDOUT_CALLBACK=debug"
+ ],
+ "extra_arguments": [
+ "--scp-extra-args", "'-O'",
+ "--ssh-extra-args",
+ "-o IdentitiesOnly=yes -o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedAlgorithms=+ssh-rsa"
]
}
]
--- /dev/null
+../common-packer/templates/builder.pkr.hcl
\ No newline at end of file
},
{
"type": "ansible",
- "playbook_file": "provision/devstack-pre-pip.yaml",
+ "playbook_file": "provision/devstack-pre-pip-centos.yaml",
"command": "./common-packer/ansible-playbook.sh",
"skip_version_check": true,
"ansible_env_vars": [
],
"extra_arguments": [
"--extra-vars",
- "os_branch=stable/queens rdo_branch=queens"
+ "os_branch=stable/queens rdo_branch=queens",
+ "--scp-extra-args", "'-O'",
+ "--ssh-extra-args",
+ "-o IdentitiesOnly=yes -o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedAlgorithms=+ssh-rsa"
]
}
]
--- /dev/null
+packer {
+ required_plugins {
+ openstack = {
+ version = ">= 1.0.0"
+ source = "github.com/hashicorp/openstack"
+ }
+ }
+}
+
+variable "ansible_roles_path" {
+ type = string
+ default = ".galaxy"
+}
+
+variable "arch" {
+ type = string
+ default = "x86_64"
+}
+
+variable "base_image" {
+ type = string
+ default = null
+}
+
+variable "cloud_network" {
+ type = string
+ default = null
+}
+
+variable "cloud_region" {
+ type = string
+ default = "ca-ymq-1"
+}
+
+variable "cloud_auth_url" {
+ type = string
+ default = null
+}
+
+variable "cloud_tenant" {
+ type = string
+ default = null
+}
+
+variable "cloud_user" {
+ type = string
+ default = null
+}
+
+variable "cloud_pass" {
+ type = string
+ default = null
+}
+
+variable "cloud_user_data" {
+ type = string
+ default = null
+}
+
+variable "distro" {
+ type = string
+ default = null
+}
+
+variable "docker_source_image" {
+ type = string
+ default = null
+}
+
+variable "flavor" {
+ type = string
+ default = "v3-standard-2"
+}
+
+variable "ssh_proxy_host" {
+ type = string
+ default = ""
+}
+
+variable "source_ami_filter_name" {
+ type = string
+ default = null
+}
+
+variable "source_ami_filter_product_code" {
+ type = string
+ default = null
+}
+
+variable "source_ami_filter_owner" {
+ type = string
+ default = null
+}
+
+variable "ssh_user" {
+ type = string
+}
+
+variable "vm_image_disk_format" {
+ type = string
+ default = ""
+}
+
+variable "vm_use_block_storage" {
+ type = string
+ default = "true"
+}
+
+variable "vm_volume_size" {
+ type = string
+ default = "20"
+}
+
+source "docker" "devstack-pre-pip-queens" {
+ changes = ["ENTRYPOINT [\"\"]", "CMD [\"\"]"]
+ commit = true
+ image = "${var.docker_source_image}"
+}
+
+source "openstack" "devstack-pre-pip-queens" {
+ flavor = "${var.flavor}"
+ image_disk_format = "${var.vm_image_disk_format}"
+ image_name = "ZZCI - ${var.distro} - devstack-queens - ${var.arch} - ${legacy_isotime("20060102-150405.000")}"
+ instance_name = "${var.distro}-devstack-queens-${uuidv4()}"
+ metadata = {
+ ci_managed = "yes"
+ }
+ networks = ["${var.cloud_network}"]
+ region = "${var.cloud_region}"
+ source_image_name = "${var.base_image}"
+ ssh_proxy_host = "${var.ssh_proxy_host}"
+ ssh_username = "${var.ssh_user}"
+ use_blockstorage_volume = "${var.vm_use_block_storage}"
+ user_data_file = "${var.cloud_user_data}"
+ volume_size = "${var.vm_volume_size}"
+}
+
+build {
+ sources = ["source.docker.devstack-pre-pip-queens", "source.openstack.devstack-pre-pip-queens"]
+
+ provisioner "shell" {
+ execute_command = "chmod +x {{ .Path }}; if [ \"$UID\" == \"0\" ]; then {{ .Vars }} '{{ .Path }}'; else {{ .Vars }} sudo -E '{{ .Path }}'; fi"
+ scripts = ["common-packer/provision/install-python.sh"]
+ }
+
+ provisioner "shell-local" {
+ command = "./common-packer/ansible-galaxy.sh ${var.ansible_roles_path}"
+ }
+
+ provisioner "ansible" {
+ ansible_env_vars = [
+ "ANSIBLE_DEBUG=False",
+ "ANSIBLE_NOCOWS=1",
+ "ANSIBLE_PIPELINING=True",
+ "ANSIBLE_ROLES_PATH=${var.ansible_roles_path}",
+ "ANSIBLE_CALLBACK_WHITELIST=profile_tasks",
+ "ANSIBLE_STDOUT_CALLBACK=debug"
+ ]
+ command = "./common-packer/ansible-playbook.sh"
+ extra_arguments = [
+ "--extra-vars", "os_branch=stable/queens rdo_branch=queens",
+ "--scp-extra-args", "'-O'",
+ "--ssh-extra-args", "-o IdentitiesOnly=yes -o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedAlgorithms=+ssh-rsa"
+ ]
+ playbook_file = "provision/devstack-pre-pip-centos.yaml"
+ skip_version_check = true
+ }
+}
},
{
"type": "ansible",
- "playbook_file": "provision/devstack-pre-pip.yaml",
+ "playbook_file": "provision/devstack-pre-pip-centos.yaml",
"command": "./common-packer/ansible-playbook.sh",
"skip_version_check": true,
"ansible_env_vars": [
],
"extra_arguments": [
"--extra-vars",
- "os_branch=stable/rocky rdo_branch=rocky"
+ "os_branch=stable/queens rdo_branch=queens",
+ "--scp-extra-args", "'-O'",
+ "--ssh-extra-args",
+ "-o IdentitiesOnly=yes -o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedAlgorithms=+ssh-rsa"
]
}
]
--- /dev/null
+packer {
+ required_plugins {
+ openstack = {
+ version = ">= 1.0.0"
+ source = "github.com/hashicorp/openstack"
+ }
+ }
+}
+
+variable "ansible_roles_path" {
+ type = string
+ default = ".galaxy"
+}
+
+variable "arch" {
+ type = string
+ default = "x86_64"
+}
+
+variable "base_image" {
+ type = string
+ default = null
+}
+
+variable "cloud_network" {
+ type = string
+ default = null
+}
+
+variable "cloud_region" {
+ type = string
+ default = "ca-ymq-1"
+}
+
+variable "cloud_auth_url" {
+ type = string
+ default = null
+}
+
+variable "cloud_tenant" {
+ type = string
+ default = null
+}
+
+variable "cloud_user" {
+ type = string
+ default = null
+}
+
+variable "cloud_pass" {
+ type = string
+ default = null
+}
+
+variable "cloud_user_data" {
+ type = string
+ default = null
+}
+
+variable "distro" {
+ type = string
+ default = null
+}
+
+variable "docker_source_image" {
+ type = string
+ default = null
+}
+
+variable "flavor" {
+ type = string
+ default = "v3-standard-2"
+}
+
+variable "ssh_proxy_host" {
+ type = string
+ default = ""
+}
+
+variable "source_ami_filter_name" {
+ type = string
+ default = null
+}
+
+variable "source_ami_filter_product_code" {
+ type = string
+ default = null
+}
+
+variable "source_ami_filter_owner" {
+ type = string
+ default = null
+}
+
+variable "ssh_user" {
+ type = string
+}
+
+variable "vm_image_disk_format" {
+ type = string
+ default = ""
+}
+
+variable "vm_use_block_storage" {
+ type = string
+ default = "true"
+}
+
+variable "vm_volume_size" {
+ type = string
+ default = "20"
+}
+
+source "docker" "devstack-pre-pip-rocky" {
+ changes = ["ENTRYPOINT [\"\"]", "CMD [\"\"]"]
+ commit = true
+ image = "${var.docker_source_image}"
+}
+
+source "openstack" "devstack-pre-pip-rocky" {
+ flavor = "${var.flavor}"
+ image_disk_format = "${var.vm_image_disk_format}"
+ image_name = "ZZCI - ${var.distro} - devstack-rocky - ${var.arch} - ${legacy_isotime("20060102-150405.000")}"
+ instance_name = "${var.distro}-devstack-rocky-${uuidv4()}"
+ metadata = {
+ ci_managed = "yes"
+ }
+ networks = ["${var.cloud_network}"]
+ region = "${var.cloud_region}"
+ source_image_name = "${var.base_image}"
+ ssh_proxy_host = "${var.ssh_proxy_host}"
+ ssh_username = "${var.ssh_user}"
+ use_blockstorage_volume = "${var.vm_use_block_storage}"
+ user_data_file = "${var.cloud_user_data}"
+ volume_size = "${var.vm_volume_size}"
+}
+
+build {
+ sources = ["source.docker.devstack-pre-pip-rocky", "source.openstack.devstack-pre-pip-rocky"]
+
+ provisioner "shell" {
+ execute_command = "chmod +x {{ .Path }}; if [ \"$UID\" == \"0\" ]; then {{ .Vars }} '{{ .Path }}'; else {{ .Vars }} sudo -E '{{ .Path }}'; fi"
+ scripts = ["common-packer/provision/install-python.sh"]
+ }
+
+ provisioner "shell-local" {
+ command = "./common-packer/ansible-galaxy.sh ${var.ansible_roles_path}"
+ }
+
+ provisioner "ansible" {
+ ansible_env_vars = [
+ "ANSIBLE_DEBUG=False",
+ "ANSIBLE_NOCOWS=1",
+ "ANSIBLE_PIPELINING=True",
+ "ANSIBLE_ROLES_PATH=${var.ansible_roles_path}",
+ "ANSIBLE_CALLBACK_WHITELIST=profile_tasks",
+ "ANSIBLE_STDOUT_CALLBACK=debug"
+ ]
+ command = "./common-packer/ansible-playbook.sh"
+ extra_arguments = [
+ "--extra-vars", "os_branch=stable/queens rdo_branch=queens",
+ "--scp-extra-args", "'-O'",
+ "--ssh-extra-args", "-o IdentitiesOnly=yes -o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedAlgorithms=+ssh-rsa"
+ ]
+ playbook_file = "provision/devstack-pre-pip-centos.yaml"
+ skip_version_check = true
+ }
+}
},
{
"type": "ansible",
- "playbook_file": "provision/devstack-pre-pip.yaml",
+ "playbook_file": "provision/devstack-pre-pip-centos.yaml",
"command": "./common-packer/ansible-playbook.sh",
"skip_version_check": true,
"ansible_env_vars": [
],
"extra_arguments": [
"--extra-vars",
- "os_branch=stable/stein rdo_branch=stein"
+ "os_branch=stable/queens rdo_branch=queens",
+ "--scp-extra-args", "'-O'",
+ "--ssh-extra-args",
+ "-o IdentitiesOnly=yes -o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedAlgorithms=+ssh-rsa"
]
}
]
--- /dev/null
+packer {
+ required_plugins {
+ openstack = {
+ version = ">= 1.0.0"
+ source = "github.com/hashicorp/openstack"
+ }
+ }
+}
+
+variable "ansible_roles_path" {
+ type = string
+ default = ".galaxy"
+}
+
+variable "arch" {
+ type = string
+ default = "x86_64"
+}
+
+variable "base_image" {
+ type = string
+ default = null
+}
+
+variable "cloud_network" {
+ type = string
+ default = null
+}
+
+variable "cloud_region" {
+ type = string
+ default = "ca-ymq-1"
+}
+
+variable "cloud_auth_url" {
+ type = string
+ default = null
+}
+
+variable "cloud_tenant" {
+ type = string
+ default = null
+}
+
+variable "cloud_user" {
+ type = string
+ default = null
+}
+
+variable "cloud_pass" {
+ type = string
+ default = null
+}
+
+variable "cloud_user_data" {
+ type = string
+ default = null
+}
+
+variable "distro" {
+ type = string
+ default = null
+}
+
+variable "docker_source_image" {
+ type = string
+ default = null
+}
+
+variable "flavor" {
+ type = string
+ default = "v3-standard-2"
+}
+
+variable "ssh_proxy_host" {
+ type = string
+ default = ""
+}
+
+variable "source_ami_filter_name" {
+ type = string
+ default = null
+}
+
+variable "source_ami_filter_product_code" {
+ type = string
+ default = null
+}
+
+variable "source_ami_filter_owner" {
+ type = string
+ default = null
+}
+
+variable "ssh_user" {
+ type = string
+}
+
+variable "vm_image_disk_format" {
+ type = string
+ default = ""
+}
+
+variable "vm_use_block_storage" {
+ type = string
+ default = "true"
+}
+
+variable "vm_volume_size" {
+ type = string
+ default = "20"
+}
+
+source "docker" "devstack-pre-pip-stein" {
+ changes = ["ENTRYPOINT [\"\"]", "CMD [\"\"]"]
+ commit = true
+ image = "${var.docker_source_image}"
+}
+
+source "openstack" "devstack-pre-pip-stein" {
+ flavor = "${var.flavor}"
+ image_disk_format = "${var.vm_image_disk_format}"
+ image_name = "ZZCI - ${var.distro} - devstack-stein - ${var.arch} - ${legacy_isotime("20060102-150405.000")}"
+ instance_name = "${var.distro}-devstack-stein-${uuidv4()}"
+ metadata = {
+ ci_managed = "yes"
+ }
+ networks = ["${var.cloud_network}"]
+ region = "${var.cloud_region}"
+ source_image_name = "${var.base_image}"
+ ssh_proxy_host = "${var.ssh_proxy_host}"
+ ssh_username = "${var.ssh_user}"
+ use_blockstorage_volume = "${var.vm_use_block_storage}"
+ user_data_file = "${var.cloud_user_data}"
+ volume_size = "${var.vm_volume_size}"
+}
+
+build {
+ sources = ["source.docker.devstack-pre-pip-stein", "source.openstack.devstack-pre-pip-stein"]
+
+ provisioner "shell" {
+ execute_command = "chmod +x {{ .Path }}; if [ \"$UID\" == \"0\" ]; then {{ .Vars }} '{{ .Path }}'; else {{ .Vars }} sudo -E '{{ .Path }}'; fi"
+ scripts = ["common-packer/provision/install-python.sh"]
+ }
+
+ provisioner "shell-local" {
+ command = "./common-packer/ansible-galaxy.sh ${var.ansible_roles_path}"
+ }
+
+ provisioner "ansible" {
+ ansible_env_vars = ["ANSIBLE_DEBUG=False", "ANSIBLE_NOCOWS=1", "ANSIBLE_PIPELINING=True", "ANSIBLE_ROLES_PATH=${var.ansible_roles_path}", "ANSIBLE_CALLBACK_WHITELIST=profile_tasks", "ANSIBLE_STDOUT_CALLBACK=debug"]
+ command = "./common-packer/ansible-playbook.sh"
+ extra_arguments = ["--extra-vars", "os_branch=stable/queens rdo_branch=queens", "--scp-extra-args", "'-O'", "--ssh-extra-args", "-o IdentitiesOnly=yes -o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedAlgorithms=+ssh-rsa"]
+ playbook_file = "provision/devstack-pre-pip-centos.yaml"
+ skip_version_check = true
+ }
+}
--- /dev/null
+{
+ "variables": {
+ "ansible_roles_path": ".galaxy",
+ "arch": "x86_64",
+ "base_image": null,
+ "cloud_network": null,
+ "cloud_user_data": null,
+ "cloud_region": "ca-ymq-1",
+ "vm_use_block_storage": "true",
+ "vm_volume_size": "20",
+ "vm_image_disk_format": "",
+ "distro": null,
+ "docker_source_image": null,
+ "flavor": "v3-standard-2",
+ "ssh_user": null,
+ "ssh_proxy_host": ""
+ },
+ "builders": [
+ {
+ "name": "openstack",
+ "image_name": "ZZCI - {{user `distro`}} - devstack-yoga - {{user `arch`}} - {{isotime \"20060102-150405.000\"}}",
+ "instance_name": "{{user `distro`}}-devstack-yoga-{{uuid}}",
+ "source_image_name": "{{user `base_image`}}",
+ "type": "openstack",
+ "region": "{{user `cloud_region`}}",
+ "networks": ["{{user `cloud_network`}}"],
+ "user_data_file": "{{user `cloud_user_data`}}",
+ "ssh_username": "{{user `ssh_user`}}",
+ "ssh_proxy_host": "{{user `ssh_proxy_host`}}",
+ "flavor": "{{user `flavor`}}",
+ "metadata": {
+ "ci_managed": "yes"
+ },
+ "use_blockstorage_volume": "{{user `vm_use_block_storage`}}",
+ "volume_size": "{{user `vm_volume_size`}}",
+ "image_disk_format": "{{user `vm_image_disk_format`}}"
+ },
+ {
+ "name": "docker",
+ "type": "docker",
+ "image": "{{ user `docker_source_image` }}",
+ "commit": true,
+ "changes": ["ENTRYPOINT [\"\"]", "CMD [\"\"]"]
+ }
+ ],
+ "provisioners": [
+ {
+ "type": "shell",
+ "scripts": ["common-packer/provision/install-python.sh"],
+ "execute_command": "chmod +x {{ .Path }}; if [ \"$UID\" == \"0\" ]; then {{ .Vars }} '{{ .Path }}'; else {{ .Vars }} sudo -E '{{ .Path }}'; fi"
+ },
+ {
+ "type": "shell-local",
+ "command": "./common-packer/ansible-galaxy.sh {{user `ansible_roles_path`}}"
+ },
+ {
+ "type": "ansible",
+ "playbook_file": "provision/devstack-pre-pip-centos.yaml",
+ "command": "./common-packer/ansible-playbook.sh",
+ "skip_version_check": true,
+ "ansible_env_vars": [
+ "ANSIBLE_DEBUG=False",
+ "ANSIBLE_NOCOWS=1",
+ "ANSIBLE_PIPELINING=True",
+ "ANSIBLE_ROLES_PATH={{user `ansible_roles_path`}}",
+ "ANSIBLE_CALLBACK_WHITELIST=profile_tasks",
+ "ANSIBLE_STDOUT_CALLBACK=debug"
+ ],
+ "extra_arguments": [
+ "--extra-vars",
+ "os_branch=stable/yoga rdo_branch=yoga",
+ "--scp-extra-args", "'-O'",
+ "--ssh-extra-args",
+ "-o IdentitiesOnly=yes -o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedAlgorithms=+ssh-rsa"
+ ]
+ }
+ ]
+}
--- /dev/null
+packer {
+ required_plugins {
+ openstack = {
+ version = ">= 1.0.0"
+ source = "github.com/hashicorp/openstack"
+ }
+ }
+}
+
+variable "ansible_roles_path" {
+ type = string
+ default = ".galaxy"
+}
+
+variable "arch" {
+ type = string
+ default = "x86_64"
+}
+
+variable "base_image" {
+ type = string
+ default = null
+}
+
+variable "cloud_network" {
+ type = string
+ default = null
+}
+
+variable "cloud_region" {
+ type = string
+ default = "ca-ymq-1"
+}
+
+variable "cloud_auth_url" {
+ type = string
+ default = null
+}
+
+variable "cloud_tenant" {
+ type = string
+ default = null
+}
+
+variable "cloud_user" {
+ type = string
+ default = null
+}
+
+variable "cloud_pass" {
+ type = string
+ default = null
+}
+
+variable "cloud_user_data" {
+ type = string
+ default = null
+}
+
+variable "distro" {
+ type = string
+ default = null
+}
+
+variable "docker_source_image" {
+ type = string
+ default = null
+}
+
+variable "flavor" {
+ type = string
+ default = "v3-standard-2"
+}
+
+variable "ssh_proxy_host" {
+ type = string
+ default = ""
+}
+
+variable "source_ami_filter_name" {
+ type = string
+ default = null
+}
+
+variable "source_ami_filter_product_code" {
+ type = string
+ default = null
+}
+
+variable "source_ami_filter_owner" {
+ type = string
+ default = null
+}
+
+variable "ssh_user" {
+ type = string
+}
+
+variable "vm_image_disk_format" {
+ type = string
+ default = ""
+}
+
+variable "vm_use_block_storage" {
+ type = string
+ default = "true"
+}
+
+variable "vm_volume_size" {
+ type = string
+ default = "20"
+}
+
+source "docker" "devstack-pre-pip-yoga" {
+ changes = ["ENTRYPOINT [\"\"]", "CMD [\"\"]"]
+ commit = true
+ image = "${var.docker_source_image}"
+}
+
+source "openstack" "devstack-pre-pip-yoga" {
+ flavor = "${var.flavor}"
+ image_disk_format = "${var.vm_image_disk_format}"
+ image_name = "ZZCI - ${var.distro} - devstack-yoga - ${var.arch} - ${legacy_isotime("20060102-150405.000")}"
+ instance_name = "${var.distro}-devstack-yoga-${uuidv4()}"
+ metadata = {
+ ci_managed = "yes"
+ }
+ networks = ["${var.cloud_network}"]
+ region = "${var.cloud_region}"
+ source_image_name = "${var.base_image}"
+ ssh_proxy_host = "${var.ssh_proxy_host}"
+ ssh_username = "${var.ssh_user}"
+ use_blockstorage_volume = "${var.vm_use_block_storage}"
+ user_data_file = "${var.cloud_user_data}"
+ volume_size = "${var.vm_volume_size}"
+}
+
+build {
+ sources = ["source.docker.devstack-pre-pip-yoga", "source.openstack.devstack-pre-pip-yoga"]
+
+ provisioner "shell" {
+ execute_command = "chmod +x {{ .Path }}; if [ \"$UID\" == \"0\" ]; then {{ .Vars }} '{{ .Path }}'; else {{ .Vars }} sudo -E '{{ .Path }}'; fi"
+ scripts = ["common-packer/provision/install-python.sh"]
+ }
+
+ provisioner "shell-local" {
+ command = "./common-packer/ansible-galaxy.sh ${var.ansible_roles_path}"
+ }
+
+ provisioner "ansible" {
+ ansible_env_vars = ["ANSIBLE_DEBUG=False", "ANSIBLE_NOCOWS=1", "ANSIBLE_PIPELINING=True", "ANSIBLE_ROLES_PATH=${var.ansible_roles_path}", "ANSIBLE_CALLBACK_WHITELIST=profile_tasks", "ANSIBLE_STDOUT_CALLBACK=debug"]
+ command = "./common-packer/ansible-playbook.sh"
+ extra_arguments = ["--extra-vars", "os_branch=stable/yoga rdo_branch=yoga", "--scp-extra-args", "'-O'", "--ssh-extra-args", "-o IdentitiesOnly=yes -o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedAlgorithms=+ssh-rsa"]
+ playbook_file = "provision/devstack-pre-pip-centos.yaml"
+ skip_version_check = true
+ }
+}
},
{
"type": "ansible",
- "playbook_file": "provision/devstack.yaml",
+ "playbook_file": "provision/devstack-centos.yaml",
"command": "./common-packer/ansible-playbook.sh",
"skip_version_check": true,
"ansible_env_vars": [
"ANSIBLE_ROLES_PATH={{user `ansible_roles_path`}}",
"ANSIBLE_CALLBACK_WHITELIST=profile_tasks",
"ANSIBLE_STDOUT_CALLBACK=debug"
+ ],
+ "extra_arguments": [
+ "--scp-extra-args", "'-O'",
+ "--ssh-extra-args",
+ "-o IdentitiesOnly=yes -o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedAlgorithms=+ssh-rsa"
]
}
]
--- /dev/null
+packer {
+ required_plugins {
+ openstack = {
+ version = ">= 1.0.0"
+ source = "github.com/hashicorp/openstack"
+ }
+ }
+}
+
+variable "ansible_roles_path" {
+ type = string
+ default = ".galaxy"
+}
+
+variable "arch" {
+ type = string
+ default = "x86_64"
+}
+
+variable "base_image" {
+ type = string
+ default = null
+}
+
+variable "cloud_network" {
+ type = string
+ default = null
+}
+
+variable "cloud_region" {
+ type = string
+ default = "ca-ymq-1"
+}
+
+variable "cloud_auth_url" {
+ type = string
+ default = null
+}
+
+variable "cloud_tenant" {
+ type = string
+ default = null
+}
+
+variable "cloud_user" {
+ type = string
+ default = null
+}
+
+variable "cloud_pass" {
+ type = string
+ default = null
+}
+
+variable "cloud_user_data" {
+ type = string
+ default = null
+}
+
+variable "distro" {
+ type = string
+ default = null
+}
+
+variable "docker_source_image" {
+ type = string
+ default = null
+}
+
+variable "flavor" {
+ type = string
+ default = "v3-standard-2"
+}
+
+variable "ssh_proxy_host" {
+ type = string
+ default = ""
+}
+
+variable "source_ami_filter_name" {
+ type = string
+ default = null
+}
+
+variable "source_ami_filter_product_code" {
+ type = string
+ default = null
+}
+
+variable "source_ami_filter_owner" {
+ type = string
+ default = null
+}
+
+variable "ssh_user" {
+ type = string
+}
+
+variable "vm_image_disk_format" {
+ type = string
+ default = ""
+}
+
+variable "vm_use_block_storage" {
+ type = string
+ default = "true"
+}
+
+variable "vm_volume_size" {
+ type = string
+ default = "20"
+}
+
+source "docker" "devstack" {
+ changes = ["ENTRYPOINT [\"\"]", "CMD [\"\"]"]
+ commit = true
+ image = "${var.docker_source_image}"
+}
+
+source "openstack" "devstack" {
+ flavor = "${var.flavor}"
+ image_disk_format = "${var.vm_image_disk_format}"
+ image_name = "ZZCI - ${var.distro} - devstack - ${var.arch} - ${legacy_isotime("20060102-150405.000")}"
+ instance_name = "${var.distro}-devstack-${uuidv4()}"
+ metadata = {
+ ci_managed = "yes"
+ }
+ networks = ["${var.cloud_network}"]
+ region = "${var.cloud_region}"
+ source_image_name = "${var.base_image}"
+ ssh_proxy_host = "${var.ssh_proxy_host}"
+ ssh_username = "${var.ssh_user}"
+ use_blockstorage_volume = "${var.vm_use_block_storage}"
+ user_data_file = "${var.cloud_user_data}"
+ volume_size = "${var.vm_volume_size}"
+}
+
+build {
+ sources = ["source.docker.devstack", "source.openstack.devstack"]
+
+ provisioner "shell" {
+ execute_command = "chmod +x {{ .Path }}; if [ \"$UID\" == \"0\" ]; then {{ .Vars }} '{{ .Path }}'; else {{ .Vars }} sudo -E '{{ .Path }}'; fi"
+ scripts = ["common-packer/provision/install-python.sh"]
+ }
+
+ provisioner "shell-local" {
+ command = "./common-packer/ansible-galaxy.sh ${var.ansible_roles_path}"
+ }
+
+ provisioner "ansible" {
+ ansible_env_vars = ["ANSIBLE_NOCOWS=1", "ANSIBLE_PIPELINING=True", "ANSIBLE_ROLES_PATH=${var.ansible_roles_path}", "ANSIBLE_CALLBACK_WHITELIST=profile_tasks", "ANSIBLE_STDOUT_CALLBACK=debug"]
+ command = "./common-packer/ansible-playbook.sh"
+ extra_arguments = ["--scp-extra-args", "'-O'", "--ssh-extra-args", "-o IdentitiesOnly=yes -o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedAlgorithms=+ssh-rsa"]
+ playbook_file = "provision/devstack-centos.yaml"
+ skip_version_check = true
+ }
+}
--- /dev/null
+../common-packer/templates/docker.pkr.hcl
\ No newline at end of file
"ANSIBLE_ROLES_PATH={{user `ansible_roles_path`}}",
"ANSIBLE_CALLBACK_WHITELIST=profile_tasks",
"ANSIBLE_STDOUT_CALLBACK=debug"
+ ],
+ "extra_arguments": [
+ "--scp-extra-args", "'-O'",
+ "--ssh-extra-args",
+ "-o IdentitiesOnly=yes -o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedAlgorithms=+ssh-rsa"
]
}
]
--- /dev/null
+packer {
+ required_plugins {
+ openstack = {
+ version = ">= 1.0.0"
+ source = "github.com/hashicorp/openstack"
+ }
+ }
+}
+
+variable "ansible_roles_path" {
+ type = string
+ default = ".galaxy"
+}
+
+variable "arch" {
+ type = string
+ default = "x86_64"
+}
+
+variable "base_image" {
+ type = string
+ default = null
+}
+
+variable "cloud_network" {
+ type = string
+ default = null
+}
+
+variable "cloud_region" {
+ type = string
+ default = "ca-ymq-1"
+}
+
+variable "cloud_auth_url" {
+ type = string
+ default = null
+}
+
+variable "cloud_tenant" {
+ type = string
+ default = null
+}
+
+variable "cloud_user" {
+ type = string
+ default = null
+}
+
+variable "cloud_pass" {
+ type = string
+ default = null
+}
+
+variable "cloud_user_data" {
+ type = string
+ default = null
+}
+
+variable "distro" {
+ type = string
+ default = null
+}
+
+variable "docker_source_image" {
+ type = string
+ default = null
+}
+
+variable "flavor" {
+ type = string
+ default = "v3-standard-2"
+}
+
+variable "ssh_proxy_host" {
+ type = string
+ default = ""
+}
+
+variable "source_ami_filter_name" {
+ type = string
+ default = null
+}
+
+variable "source_ami_filter_product_code" {
+ type = string
+ default = null
+}
+
+variable "source_ami_filter_owner" {
+ type = string
+ default = null
+}
+
+variable "ssh_user" {
+ type = string
+}
+
+variable "vm_image_disk_format" {
+ type = string
+ default = ""
+}
+
+variable "vm_use_block_storage" {
+ type = string
+ default = "true"
+}
+
+variable "vm_volume_size" {
+ type = string
+ default = "20"
+}
+
+source "docker" "helm" {
+ changes = ["ENTRYPOINT [\"\"]", "CMD [\"\"]"]
+ commit = true
+ image = "${var.docker_source_image}"
+}
+
+source "openstack" "helm" {
+ domain_name = "Default"
+ flavor = "v1-standard-1"
+ identity_endpoint = "${var.cloud_auth_url}"
+ image_disk_format = "${var.vm_image_disk_format}"
+ image_name = "ZZCI - ${var.distro} - helm - ${var.arch} - ${legacy_isotime("20060102-150405.000")}"
+ instance_name = "${var.distro}-builder-${uuidv4()}"
+ metadata = {
+ ci_managed = "yes"
+ }
+ networks = ["${var.cloud_network}"]
+ password = "${var.cloud_pass}"
+ region = "ca-ymq-1"
+ source_image_name = "${var.base_image}"
+ ssh_proxy_host = "${var.ssh_proxy_host}"
+ ssh_username = "${var.ssh_user}"
+ tenant_name = "${var.cloud_tenant}"
+ use_blockstorage_volume = "${var.vm_use_block_storage}"
+ user_data_file = "${var.cloud_user_data}"
+ username = "${var.cloud_user}"
+ volume_size = "${var.vm_volume_size}"
+}
+
+# a build block invokes sources and runs provisioning steps on them. The
+# documentation for build blocks can be found here:
+# https://www.packer.io/docs/templates/hcl_templates/blocks/build
+build {
+ sources = ["source.docker.helm", "source.openstack.helm"]
+
+ provisioner "shell" {
+ execute_command = "chmod +x {{ .Path }}; if [ \"$UID\" == \"0\" ]; then {{ .Vars }} '{{ .Path }}'; else {{ .Vars }} sudo -E '{{ .Path }}'; fi"
+ scripts = ["common-packer/provision/install-python.sh"]
+ }
+
+ provisioner "shell-local" {
+ command = "./common-packer/ansible-galaxy.sh ${var.ansible_roles_path}"
+ }
+
+ provisioner "ansible" {
+ ansible_env_vars = ["ANSIBLE_NOCOWS=1", "ANSIBLE_PIPELINING=True", "ANSIBLE_ROLES_PATH=${var.ansible_roles_path}", "ANSIBLE_CALLBACK_WHITELIST=profile_tasks", "ANSIBLE_STDOUT_CALLBACK=debug"]
+ command = "./common-packer/ansible-playbook.sh"
+ extra_arguments = ["--scp-extra-args", "'-O'", "--ssh-extra-args", "-o IdentitiesOnly=yes -o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedAlgorithms=+ssh-rsa"]
+ playbook_file = "provision/helm.yaml"
+ skip_version_check = true
+ }
+}
"ANSIBLE_ROLES_PATH={{user `ansible_roles_path`}}",
"ANSIBLE_CALLBACK_WHITELIST=profile_tasks",
"ANSIBLE_STDOUT_CALLBACK=debug"
+ ],
+ "extra_arguments": [
+ "--scp-extra-args", "'-O'",
+ "--ssh-extra-args",
+ "-o IdentitiesOnly=yes -o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedAlgorithms=+ssh-rsa"
]
}
]
--- /dev/null
+packer {
+ required_plugins {
+ openstack = {
+ version = ">= 1.0.0"
+ source = "github.com/hashicorp/openstack"
+ }
+ }
+}
+variable "ansible_roles_path" {
+ type = string
+ default = ".galaxy"
+}
+
+variable "arch" {
+ type = string
+ default = "x86_64"
+}
+
+variable "base_image" {
+ type = string
+ default = null
+}
+
+variable "cloud_network" {
+ type = string
+ default = null
+}
+
+variable "cloud_region" {
+ type = string
+ default = "ca-ymq-1"
+}
+
+variable "cloud_auth_url" {
+ type = string
+ default = null
+}
+
+variable "cloud_tenant" {
+ type = string
+ default = null
+}
+
+variable "cloud_user" {
+ type = string
+ default = null
+}
+
+variable "cloud_pass" {
+ type = string
+ default = null
+}
+
+variable "cloud_user_data" {
+ type = string
+ default = null
+}
+
+variable "distro" {
+ type = string
+ default = null
+}
+
+variable "docker_source_image" {
+ type = string
+ default = null
+}
+
+variable "flavor" {
+ type = string
+ default = "v3-standard-2"
+}
+
+variable "ssh_proxy_host" {
+ type = string
+ default = ""
+}
+
+variable "source_ami_filter_name" {
+ type = string
+ default = null
+}
+
+variable "source_ami_filter_product_code" {
+ type = string
+ default = null
+}
+
+variable "source_ami_filter_owner" {
+ type = string
+ default = null
+}
+
+variable "ssh_user" {
+ type = string
+}
+
+variable "vm_image_disk_format" {
+ type = string
+ default = ""
+}
+
+variable "vm_use_block_storage" {
+ type = string
+ default = "true"
+}
+
+variable "vm_volume_size" {
+ type = string
+ default = "20"
+}
+
+source "docker" "mininet-ovs-28" {
+ changes = ["ENTRYPOINT [\"\"]", "CMD [\"\"]"]
+ commit = true
+ image = "${var.docker_source_image}"
+}
+
+source "openstack" "mininet-ovs-28" {
+ flavor = "${var.flavor}"
+ image_disk_format = "${var.vm_image_disk_format}"
+ image_name = "ZZCI - ${var.distro} - mininet-ovs-28 - ${var.arch} - ${legacy_isotime("20060102-150405.000")}"
+ instance_name = "${var.distro}-mininet-ovs-28-${uuidv4()}"
+ metadata = {
+ ci_managed = "yes"
+ }
+ networks = ["${var.cloud_network}"]
+ region = "${var.cloud_region}"
+ source_image_name = "${var.base_image}"
+ ssh_proxy_host = "${var.ssh_proxy_host}"
+ ssh_username = "${var.ssh_user}"
+ use_blockstorage_volume = "${var.vm_use_block_storage}"
+ user_data_file = "${var.cloud_user_data}"
+ volume_size = "${var.vm_volume_size}"
+}
+
+build {
+ sources = ["source.docker.mininet-ovs-28", "source.openstack.mininet-ovs-28"]
+
+ provisioner "shell" {
+ execute_command = "chmod +x {{ .Path }}; if [ \"$UID\" == \"0\" ]; then {{ .Vars }} '{{ .Path }}'; else {{ .Vars }} sudo -E '{{ .Path }}'; fi"
+ scripts = ["common-packer/provision/install-python.sh"]
+ }
+
+ provisioner "shell-local" {
+ command = "./common-packer/ansible-galaxy.sh ${var.ansible_roles_path}"
+ }
+
+ provisioner "ansible" {
+ ansible_env_vars = ["ANSIBLE_NOCOWS=1", "ANSIBLE_PIPELINING=True", "ANSIBLE_ROLES_PATH=${var.ansible_roles_path}", "ANSIBLE_CALLBACK_WHITELIST=profile_tasks", "ANSIBLE_STDOUT_CALLBACK=debug"]
+ command = "./common-packer/ansible-playbook.sh"
+ extra_arguments = ["--scp-extra-args", "'-O'", "--ssh-extra-args", "-o IdentitiesOnly=yes -o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedAlgorithms=+ssh-rsa"]
+ playbook_file = "provision/mininet-ovs-2.8.yaml"
+ skip_version_check = true
+ }
+}
"ANSIBLE_ROLES_PATH={{user `ansible_roles_path`}}",
"ANSIBLE_CALLBACK_WHITELIST=profile_tasks",
"ANSIBLE_STDOUT_CALLBACK=debug"
+ ],
+ "extra_arguments": [
+ "--scp-extra-args", "'-O'",
+ "--ssh-extra-args",
+ "-o IdentitiesOnly=yes -o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedAlgorithms=+ssh-rsa"
]
}
]
--- /dev/null
+packer {
+ required_plugins {
+ openstack = {
+ version = ">= 1.0.0"
+ source = "github.com/hashicorp/openstack"
+ }
+ }
+}
+
+variable "ansible_roles_path" {
+ type = string
+ default = ".galaxy"
+}
+
+variable "arch" {
+ type = string
+ default = "x86_64"
+}
+
+variable "base_image" {
+ type = string
+ default = null
+}
+
+variable "cloud_network" {
+ type = string
+ default = null
+}
+
+variable "cloud_region" {
+ type = string
+ default = "ca-ymq-1"
+}
+
+variable "cloud_auth_url" {
+ type = string
+ default = null
+}
+
+variable "cloud_tenant" {
+ type = string
+ default = null
+}
+
+variable "cloud_user" {
+ type = string
+ default = null
+}
+
+variable "cloud_pass" {
+ type = string
+ default = null
+}
+
+variable "cloud_user_data" {
+ type = string
+ default = null
+}
+
+variable "distro" {
+ type = string
+ default = null
+}
+
+variable "docker_source_image" {
+ type = string
+ default = null
+}
+
+variable "flavor" {
+ type = string
+ default = "v3-standard-2"
+}
+
+variable "ssh_proxy_host" {
+ type = string
+ default = ""
+}
+
+variable "source_ami_filter_name" {
+ type = string
+ default = null
+}
+
+variable "source_ami_filter_product_code" {
+ type = string
+ default = null
+}
+
+variable "source_ami_filter_owner" {
+ type = string
+ default = null
+}
+
+variable "ssh_user" {
+ type = string
+}
+
+variable "vm_image_disk_format" {
+ type = string
+ default = ""
+}
+
+variable "vm_use_block_storage" {
+ type = string
+ default = "true"
+}
+
+variable "vm_volume_size" {
+ type = string
+ default = "20"
+}
+
+source "docker" "robot" {
+ changes = ["ENTRYPOINT [\"\"]", "CMD [\"\"]"]
+ commit = true
+ image = "${var.docker_source_image}"
+}
+
+source "openstack" "robot" {
+ flavor = "${var.flavor}"
+ image_disk_format = "${var.vm_image_disk_format}"
+ image_name = "ZZCI - ${var.distro} - robot - ${var.arch} - ${legacy_isotime("20060102-150405.000")}"
+ instance_name = "${var.distro}-robot-${uuidv4()}"
+ metadata = {
+ ci_managed = "yes"
+ }
+ networks = ["${var.cloud_network}"]
+ region = "${var.cloud_region}"
+ source_image_name = "${var.base_image}"
+ ssh_proxy_host = "${var.ssh_proxy_host}"
+ ssh_username = "${var.ssh_user}"
+ use_blockstorage_volume = "${var.vm_use_block_storage}"
+ user_data_file = "${var.cloud_user_data}"
+ volume_size = "${var.vm_volume_size}"
+}
+
+build {
+ sources = ["source.docker.robot", "source.openstack.robot"]
+
+ provisioner "shell" {
+ execute_command = "chmod +x {{ .Path }}; if [ \"$UID\" == \"0\" ]; then {{ .Vars }} '{{ .Path }}'; else {{ .Vars }} sudo -E '{{ .Path }}'; fi"
+ scripts = ["common-packer/provision/install-python.sh"]
+ }
+
+ provisioner "shell-local" {
+ command = "./common-packer/ansible-galaxy.sh ${var.ansible_roles_path}"
+ }
+
+ provisioner "ansible" {
+ ansible_env_vars = ["ANSIBLE_NOCOWS=1", "ANSIBLE_PIPELINING=True", "ANSIBLE_ROLES_PATH=${var.ansible_roles_path}", "ANSIBLE_CALLBACK_WHITELIST=profile_tasks", "ANSIBLE_STDOUT_CALLBACK=debug"]
+ command = "./common-packer/ansible-playbook.sh"
+ extra_arguments = ["--scp-extra-args", "'-O'", "--ssh-extra-args", "-o IdentitiesOnly=yes -o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedAlgorithms=+ssh-rsa"]
+ playbook_file = "provision/robot.yaml"
+ skip_version_check = true
+ }
+}