diff --git a/website/content/docs/builders/openstack.mdx b/website/content/docs/builders/openstack.mdx index ad7c527b1..624cf89a1 100644 --- a/website/content/docs/builders/openstack.mdx +++ b/website/content/docs/builders/openstack.mdx @@ -93,6 +93,9 @@ builder. Here is a basic example. This is a example to build on DevStack running in a VM. + + + ```json { "type": "openstack", @@ -110,11 +113,35 @@ VM. } ``` + + + +```hcl +builders "openstack" { + identity_endpoint = "http://:5000/v3" + tenant_name = "admin" + domain_name = "Default" + username = "admin" + password = "" + region = "RegionOne" + ssh_username = "root" + image_name = "Test image" + source_image = "" + flavor = "m1.tiny" + insecure = "true" +} +``` + + + ## Basic Example: Rackspace public cloud Here is a basic example. This is a working example to build a Ubuntu 12.04 LTS (Precise Pangolin) on Rackspace OpenStack cloud offering. + + + ```json { "type": "openstack", @@ -127,12 +154,32 @@ Here is a basic example. This is a working example to build a Ubuntu 12.04 LTS "flavor": "2" } ``` + + + + +```hcl +builders "openstack" { + username = "foo" + password = "foo" + region = "DFW" + ssh_username = "root" + image_name = "Test image" + source_image = "23b564c9-c3e6-49f9-bc68-86c7a9ab5018" + flavor = "2" +} +``` + + ## Basic Example: Private OpenStack cloud This example builds an Ubuntu 14.04 image on a private OpenStack cloud, powered by Metacloud. + + + ```json { "type": "openstack", @@ -142,6 +189,21 @@ by Metacloud. "flavor": "2" } ``` + + + + +```hcl +builders "openstack" { + ssh_username = "root" + image_name = "ubuntu1404_packer_test_1" + source_image = "91d9c168-d1e5-49ca-a775-3bfdbb6c97f1" + flavor = "2" +} +``` + + + In this case, the connection information for connecting to OpenStack doesn't appear in the template. That is because I source a standard OpenStack script @@ -182,6 +244,9 @@ A basic example of Instance with a remote root Block Storage service volume. This is a working example to build an image on private OpenStack cloud powered by Selectel VPC. + + + ```json { "type": "openstack", @@ -200,6 +265,30 @@ by Selectel VPC. "volume_type": "fast.ru-3a" } ``` + + + + +```hcl +builders "openstack" { + identity_endpoint = "https://api.selvpc.com/identity/v3" + tenant_id = "2e90c5c04c7b4c509be78723e2b55b77" + username = "foo" + password = "foo" + region = "ru-3" + ssh_username = "root" + image_name = "Test image" + source_image = "5f58ea7e-6264-4939-9d0f-0c23072b1132" + networks = "9aab504e-bedf-48af-9256-682a7fa3dabb" + flavor = "1001" + availability_zone = "ru-3a" + use_blockstorage_volume = true + volume_type = "fast.ru-3a" +} +``` + + + ## Notes on OpenStack Authorization