Refactor,update images

  * Switch ubuntu|salt-stack to fetch from mirror.mirantis.com/proposed
  * ubuntu-16-04 - add openstack builder[inactive stub]
  * add info.sh - and enable it in mirror and ubuntu16
  * Drop mcp salt repos - we don't use them for build
  * switch to release-20180306 ubuntu cloud image

Change-Id: Ic45db3fd2579262b055ecdc54b27a16a837c2dd4
diff --git a/ubuntu-16.04/template.json b/ubuntu-16.04/template.json
index c779c11..400a237 100644
--- a/ubuntu-16.04/template.json
+++ b/ubuntu-16.04/template.json
@@ -2,12 +2,27 @@
   "variables": {
     "user": "root",
     "password": "ho5uo7Uome5d",
-    "do_api_token": "{{ env `DO_API_TOKEN` }}",
     "distro": "ubuntu-16-04-x64",
-    "disk_size": "8000"
+    "disk_size": "8000",
+    "ubuntu_baseurl": "https://mirror.mirantis.com/proposed/",
+    "saltstack_repo": "deb [arch=amd64] https://mirror.mirantis.com/proposed/saltstack-2016.3/xenial/ xenial main",
+    "do_api_token": "{{ env `DO_API_TOKEN` }}",
+    "image_name": "ubuntu-16-04-x64",
+    "os_username": "{{ env `OS_USERNAME` }}",
+    "os_password": "{{ env `OS_PASSWORD` }}",
+    "os_image": "7451fac0-0ce5-4d30-ae36-cd9a90e7948e",
+    "os_endpoint": "https://cloud-cz.bud.mirantis.net:5000/v2.0",
+    "os_zone": "mcp-mk",
+    "os_floating_ip_pool": "public",
+    "os_tenant": "26e4dd19485249608ee3685f254f3909",
+    "os_network": "772f8ca6-1f4a-4535-99d0-880d6ead9a82"
   },
   "provisioners": [
     {
+      "environment_vars": [
+        "UBUNTU_BASEURL={{ user `ubuntu_baseurl` }}",
+        "SALTSTACK_GPG={{ user `saltstack_gpg` }}"
+      ],
       "type": "shell",
       "execute_command": "sh '{{.Path}}'",
       "override": {
@@ -43,9 +58,21 @@
             "scripts/network.sh",
             "scripts/security.sh",
             "scripts/cleanup.sh",
+            "scripts/info.sh",
             "scripts/zerodisk.sh"
           ]
         },
+        "openstack": {
+          "scripts": [
+            "scripts/base.sh",
+            "scripts/motd.sh",
+            "scripts/salt.sh",
+            "scripts/network.sh",
+            "scripts/security.sh",
+            "scripts/cleanup.sh",
+            "scripts/info.sh"
+          ]
+        },
         "docker": {
           "scripts": [
             "scripts/docker.sh",
@@ -229,13 +256,26 @@
       }
     },
     {
+      "type": "docker",
+      "image": "ubuntu:16.04",
+      "commit": true
+    },
+    {
+      "type": "digitalocean",
+      "api_token": "{{user `do_api_token`}}",
+      "image": "{{user `distro`}}",
+      "snapshot_name": "{{ user `distro` }}-{{ isotime \"200601021504\"  }}",
+      "region": "ams2",
+      "size": "1gb"
+    },
+    {
       "type": "qemu",
       "qemuargs": [
         [ "-m", "1024M" ],
         [ "-fda", "config-drive/cloudata.iso" ]
       ],
-      "vm_name": "{{ user `distro` }}-{{ isotime \"200601021504\"  }}",
-      "output_directory": "images/{{ user `distro` }}-qemu-{{ isotime \"200601021504\"  }}",
+      "vm_name": "{{ user `image_name` }}-{{ isotime \"200601021504\"  }}",
+      "output_directory": "images/{{ user `image_name` }}-qemu-{{ isotime \"200601021504\"  }}",
       "format": "qcow2",
       "iso_checksum": "566efef1d6f12e7d3a994c2405bdb642",
       "iso_checksum_type": "md5",
@@ -251,17 +291,21 @@
       "ssh_wait_timeout": "360s"
     },
     {
-      "type": "docker",
-      "image": "ubuntu:16.04",
-      "commit": true
-    },
-    {
-      "type": "digitalocean",
-      "api_token": "{{user `do_api_token`}}",
-      "image": "{{user `distro`}}",
-      "snapshot_name": "{{ user `distro` }}-{{ isotime \"200601021504\"  }}",
-      "region": "ams2",
-      "size": "1gb"
+      "type": "openstack",
+      "ssh_username": "{{user `user`}}",
+      "ssh_password": "{{user `password`}}",
+      "image_name": "{{user `image_name`}}",
+      "floating_ip_pool": "{{user `os_floating_ip_pool`}}",
+      "reuse_ips": "true",
+      "source_image": "{{ user `os_image` }}",
+      "flavor": "{{ user `os_flavor` }}",
+      "user_data_file": "config-drive/user-data.yaml",
+      "tenant_id": "{{ user `os_tenant` }}",
+      "networks": ["{{ user `os_network` }}"],
+      "availability_zone": "{{user `os_zone`}}",
+      "identity_endpoint": "{{user `os_endpoint`}}",
+      "username": "{{user `os_username`}}",
+      "password": "{{user `os_password`}}"
     }
   ]
 }