From c7fdb45806126a0976b68fc3b2d94dfc2dfd3d3f Mon Sep 17 00:00:00 2001 From: kiranchavala Date: Fri, 24 Feb 2023 15:05:53 +0530 Subject: [PATCH 1/3] Added correct docker and terraform configuration commands --- README.md | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 9c128cc1..44458669 100644 --- a/README.md +++ b/README.md @@ -48,9 +48,14 @@ $ make build $ ls $GOPATH/bin/terraform-provider-cloudstack ``` Once the build is ready, you have to copy the binary into Terraform locally (version appended). -On Linux this path is at ~/.terraform.d/plugins, and on Windows at %APPDATA%\terraform.d\plugins. + +On Linux and Mac this path is at ~/.terraform.d/plugins, +On Windows at %APPDATA%\terraform.d\plugins, + ```sh -$ ls ~/.terraform.d/plugins/registry.terraform.io/cloudstack/cloudstack/0.4.0/linux_amd64/terraform-provider-cloudstack_v0.4.0 +$ cd ~ +$ mkdir -p .terraform.d/plugins/localdomain/provider/cloudstack/0.4.0/linux_amd64 +$ cp $GOPATH/bin/terraform-provider-cloudstack .terraform.d/plugins/localdomain/provider/cloudstack/0.4.0/linux_amd64 ``` Testing the Provider @@ -65,8 +70,17 @@ $ make test In order to run the full suite of Acceptance tests you will need to run the CloudStack Simulator. Please follow these steps to prepare an environment for running the Acceptance tests: ```sh -$ docker pull cloudstack/simulator -$ docker run --name simulator -p 8080:5050 -d cloudstack/simulator +docker pull apache/cloudstack-simulator + +or pull it with a particular build tag + +docker pull apache/cloudstack-simulator:4.17.2.0 + +docker run --name simulator -p 8080:5050 -d apache/cloudstack-simulator + +or + +docker run --name simulator -p 8080:5050 -d apache/cloudstack-simulator:4.17.2.0 ``` When Docker started the container you can go to http://localhost:8080/client and login to the CloudStack UI as user `admin` with password `password`. It can take a few minutes for the container is fully ready, so you probably need to wait and refresh the page for a few minutes before the login page is shown. @@ -91,8 +105,8 @@ In order for all the tests to pass, you will need to create a new (empty) projec $ make testacc ``` -Sample Terraform configuration ------------------------------- +Sample Terraform configuration when testing locally +------------------------------------------------------------ Below is an example configuration to initialize provider and create a Virtual Machine instance ```sh @@ -100,7 +114,7 @@ $ cat provider.tf terraform { required_providers { cloudstack = { - source = "cloudstack/cloudstack" + source = "localdomain/provider/cloudstack" version = "0.4.0" } } From 5fd8305b1d4aae98d3ae280cc548d8c5f22ab871 Mon Sep 17 00:00:00 2001 From: Rohit Yadav Date: Fri, 4 Aug 2023 21:41:23 +0530 Subject: [PATCH 2/3] Update README.md Co-authored-by: David Jumani --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 44458669..8df4c806 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ On Windows at %APPDATA%\terraform.d\plugins, ```sh $ cd ~ -$ mkdir -p .terraform.d/plugins/localdomain/provider/cloudstack/0.4.0/linux_amd64 +$ mkdir -p ~/.terraform.d/plugins/localdomain/provider/cloudstack/0.4.0/linux_amd64 $ cp $GOPATH/bin/terraform-provider-cloudstack .terraform.d/plugins/localdomain/provider/cloudstack/0.4.0/linux_amd64 ``` From ce9933f98f7a9ae19857b08b3b7c6418de5c09dc Mon Sep 17 00:00:00 2001 From: Rohit Yadav Date: Fri, 4 Aug 2023 21:41:33 +0530 Subject: [PATCH 3/3] Update README.md Co-authored-by: David Jumani --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8df4c806..665673b2 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ On Windows at %APPDATA%\terraform.d\plugins, ```sh $ cd ~ $ mkdir -p ~/.terraform.d/plugins/localdomain/provider/cloudstack/0.4.0/linux_amd64 -$ cp $GOPATH/bin/terraform-provider-cloudstack .terraform.d/plugins/localdomain/provider/cloudstack/0.4.0/linux_amd64 +$ cp $GOPATH/bin/terraform-provider-cloudstack ~/.terraform.d/plugins/localdomain/provider/cloudstack/0.4.0/linux_amd64 ``` Testing the Provider