-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
77 additions
and
164 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,49 +20,9 @@ Nutanix is taking an inclusive approach to developing this new feature and welco | |
|
||
For a slack invite, please contact [email protected] from your business email address, and we'll add you. | ||
|
||
## Current Development Status | ||
|
||
### Completed | ||
|
||
* [x] Finished VM resource (VM resource and VM resource test.) | ||
* [x] Finished subnet resource (Subnet resource and Subnet resource test.) | ||
* [x] Finished Image resource (Image resource and image resource test.) | ||
* [x] Finished VM data source (VM data source and VM data source test.) | ||
* [x] Finished subnet data source (Subnet data source and Subnet data source test) | ||
* [x] Finished Image data source (Image data source and image data source test.) | ||
* [x] Cluster data source. | ||
* [x] Clusters data source. | ||
* [x] Virtual Machines data source. | ||
* [x] Category keys resource. | ||
* [x] Category values resource. | ||
* [x] Network security rule data source. | ||
* [x] Network security rules data source. | ||
* [x] Subnets data source. | ||
* [x] Images data source. | ||
* [x] Volume group resource. | ||
* [x] Volume group datasource. | ||
* [x] Volume groups datasource. | ||
* [x] Documentation for Resources. | ||
* [x] Documentation for Datasources. | ||
|
||
### Currently working on: | ||
* [ ] Phase 2 scoping for bug cleanup and polish | ||
|
||
### Issues | ||
|
||
* See open issues on GitHub issues | ||
|
||
## Requirements | ||
|
||
### Provider Use | ||
|
||
* [Terraform](https://www.terraform.io/downloads.html) 0.11.11+ | ||
* [Nutanix](https://portal.nutanix.com/#/page/home) Prism Central 5.6.0+ | ||
* Note: Nutanix Community Edition will be supported, when an AOS 5.6 based version is released | ||
|
||
### Provider Development | ||
|
||
* [Go](https://golang.org/doc/install) 1.11+ (to build the provider plugin) | ||
* [Terraform](https://www.terraform.io/downloads.html) 0.12+ | ||
* [Go](https://golang.org/doc/install) 1.12+ (to build the provider plugin) | ||
|
||
### Provider Use | ||
|
||
|
@@ -86,113 +46,110 @@ The following keys can be used to configure the provider. | |
* **port** - (Optional) Port for the Nutanix Prism Element. Default port is 9440. | ||
* **insecure** - (Optional) Explicitly allow the provider to perform insecure SSL requests. If omitted, default value is false. | ||
|
||
```hcl | ||
provider "nutanix" { | ||
username = "admin" | ||
password = "myPassword" | ||
port = 9440 | ||
endpoint = "10.36.7.201" | ||
insecure = true | ||
} | ||
``` | ||
|
||
## Resources | ||
|
||
* nutanix_virtual_machine | ||
* nutanix_image | ||
* nutanix_subnet | ||
* nutanix_category_key | ||
* nutanix_network_security_rule | ||
* nutanix_image | ||
* nutanix_category_value | ||
* nutanix_category_key | ||
|
||
<!-- //To be available | ||
* nutanix_volume_group | ||
--> | ||
|
||
## Data Sources | ||
|
||
* nutanix_virtual_machine | ||
* nutanix_virtual_machines | ||
* nutanix_image | ||
* nutanix_images | ||
* nutanix_subnet | ||
* nutanix_subnets | ||
* nutanix_clusters | ||
* nutanix_network_security_rule | ||
* nutanix_image | ||
* nutanix_host | ||
* nutanix_hots | ||
* nutanix_cluster | ||
* nutanix_clusters | ||
* nutanix_category_key | ||
|
||
<!-- To be avaiable | ||
* nutanix_network_security_rule | ||
* nutanix_network_security_rules | ||
* nutanix_volume_group | ||
* nutanix_volume_groups | ||
--> | ||
|
||
## Additional Resources | ||
|
||
We've got a handful of resources outside of this repository that will help users understand the interactions between terraform and Nutanix | ||
## Quick Install | ||
|
||
* YouTube | ||
_ Overview Video: [](https://www.youtube.com/watch?v=V8_Lu1mxV6g) | ||
_ Working with images: [](https://www.youtube.com/watch?v=IW0eQevZ73I) | ||
* Nutanix GitHub | ||
_ [](https://github.com/terraform-providers/terraform-provider-nutanix) | ||
_ Private repo until code goes upstream | ||
* Jon’s GitHub | ||
_ [](https://github.com/JonKohler/ThisOldCloud/tree/master/Terraform-Nutanix) | ||
_ Contains sample TF’s and PDFs from the youtube videos | ||
* Slack channel \* User community slack channel is available on nutanix.slack.com. Email [email protected] to gain entry. | ||
### Install Dependencies | ||
|
||
## Roadmap | ||
* [Terraform](https://www.terraform.io/downloads.html) 0.12+ | ||
|
||
This provider will be released as Tech Preview at .NEXT New Orleans, and is linked into the HashiCorp community providers page, here: [](https://www.terraform.io/docs/providers/type/community-index.html) | ||
### For developing or build from source | ||
|
||
We'll be working with HashiCorp as code stabilizes to upstream this properly, at which time we'll PR this entire plugin to the terraform providers org. | ||
|
||
* Complete upstream work with successful pull request | ||
* Note: Depending on external review timelines from HashiCorp and subsequent code change(s) as required | ||
* Add Volume Group resource and data source support \* This is dependent on the VG v3 API, which is currently not GA (work in progress) | ||
* Investigate data protection workflows (likely scoped snapshots, but this may directly conflict with overall pets v cattle) | ||
* Investigate project as a resource and data source, for SSP integration | ||
* Investigate Calm once API constructs are available | ||
* Investigate AFS administration workflows | ||
* Investigate cluster administration APIs (think foundation, admin settings, etc) to do physical provisioning (think DC as Code) | ||
* [Go](https://golang.org/doc/install) 1.12+ (to build the provider plugin) | ||
|
||
## Quick Install | ||
|
||
### Install Dependencies | ||
### Building/Developing Provider | ||
|
||
* Terraform | ||
We recomment to use Go 1.12+ to be able to use `go modules` | ||
|
||
### For developing or build from source | ||
```sh | ||
$ git clone https://github.com/terraform-providers/terraform-provider-nutanix.git | ||
``` | ||
|
||
Enter the provider directory and build the provider | ||
|
||
#### Golang | ||
```sh | ||
$ make tools | ||
$ make build | ||
``` | ||
|
||
[](https://github.com/golang/go) | ||
This will create a binary file `terraform-provider-nutanix` you can copy to your terraform specific project. | ||
|
||
## Install from source | ||
Alternative build: with our demo | ||
|
||
## Building from sources | ||
```sh | ||
$ make tools | ||
$ go build -o examples/terraform-provider-nutanix | ||
$ cd examples | ||
$ terraform init #to try out our demo | ||
``` | ||
|
||
1. Follow [Go installation instructions](https://golang.org/doc/install) | ||
If you need multi-OS binaries such as Linux, macOS, Windows. Run the following command. | ||
|
||
2. Make sure that `$GOPATH` variable is set (and `$GOROOT` if necessary) | ||
```sh | ||
$ make tools | ||
$ make cibuild | ||
``` | ||
|
||
3. Clone the repository: | ||
This coommand will create a `pkg/` directory with all the binaries for the most popular OS. | ||
|
||
```bash | ||
git clone https://github.com/terraform-providers/terraform-provider-nutanix.git $GOPATH/src/github.com/terraform-providers/terraform-provider-nutanix | ||
``` | ||
|
||
4. Install [golang/dep](https://github.com/golang/dep): | ||
### Common Issues using the development binary. | ||
|
||
```bash | ||
go get -u github.com/golang/dep/cmd/dep | ||
``` | ||
Terraform download the released binary instead developent one. | ||
|
||
5. Run tests: | ||
Just follow this steps to get the development binary: | ||
|
||
```bash | ||
cd $GOPATH/src/github.com/terraform-providers/terraform-provider-nutanix | ||
make test #unit tests | ||
make testacc #acceptance tests | ||
1. Copy the development terraform binary in the root folder of the project (i.e. where your main.tf is), this should be named `terraform-provider-nutanix` | ||
2. Remove the entire “.terraform” directory. | ||
```sh | ||
rm -rf .terraform/ | ||
``` | ||
|
||
6. Build the binary: | ||
|
||
```bash | ||
cd $GOPATH/src/github.com/terraform-providers/terraform-provider-nutanix | ||
make cibuild #it will create a pkg folder with the binaries for all OS including linux, windows, macOS | ||
3. Run the following command in the same folder where you have copied the development terraform binary. | ||
```sh | ||
terraform init -upgrade | ||
terraform providers -version | ||
``` | ||
|
||
4. You should see version as “nutanix (unversioned)” | ||
5. Then run your main.tf | ||
|
||
## Release it | ||
|
||
1. Install `goreleaser` tool: | ||
|
@@ -234,61 +191,17 @@ We'll be working with HashiCorp as code stabilizes to upstream this properly, at | |
git push origin v1.1.0 | ||
``` | ||
|
||
## Install from package | ||
|
||
## Building/Developing Provider | ||
|
||
We recomment to use Go 1.12+ to be able to use `go modules` | ||
|
||
```sh | ||
$ git clone https://github.com/terraform-providers/terraform-provider-nutanix.git | ||
``` | ||
|
||
Enter the provider directory and build the provider | ||
|
||
```sh | ||
$ make tools | ||
$ make build | ||
``` | ||
|
||
This will create a binary file `terraform-provider-nutanix` you can copy to your terraform specific project. | ||
|
||
Alternative build: with our demo | ||
|
||
```sh | ||
$ make tools | ||
$ go build -o examples/terraform-provider-nutanix | ||
$ cd examples | ||
$ terraform init #to try out our demo | ||
``` | ||
|
||
If you need multi-OS binaries such as Linux, macOS, Windows. Run the following command. | ||
|
||
```sh | ||
$ make tools | ||
$ make cibuild | ||
``` | ||
|
||
This coommand will create a `pkg/` directory with all the binaries for the most popular OS. | ||
|
||
|
||
### Common Issues using the development binary. | ||
|
||
Terraform download the released binary instead developent one. | ||
|
||
Just follow this steps to get the development binary: | ||
|
||
1. Copy the development terraform binary in the root folder of the project (i.e. where your main.tf is), this should be named `terraform-provider-nutanix` | ||
2. Remove the entire “.terraform” directory. | ||
```sh | ||
rm -rf .terraform/ | ||
``` | ||
## Additional Resources | ||
|
||
3. Run the following command in the same folder where you have copied the development terraform binary. | ||
```sh | ||
terraform init -upgrade | ||
terraform providers -version | ||
``` | ||
We've got a handful of resources outside of this repository that will help users understand the interactions between terraform and Nutanix | ||
4. You should see version as “nutanix (unversioned)” | ||
5. Then run your main.tf | ||
* YouTube | ||
_ Overview Video: [](https://www.youtube.com/watch?v=V8_Lu1mxV6g) | ||
_ Working with images: [](https://www.youtube.com/watch?v=IW0eQevZ73I) | ||
* Nutanix GitHub | ||
_ [](https://github.com/terraform-providers/terraform-provider-nutanix) | ||
_ Private repo until code goes upstream | ||
* Jon’s GitHub | ||
_ [](https://github.com/JonKohler/ThisOldCloud/tree/master/Terraform-Nutanix) | ||
_ Contains sample TF’s and PDFs from the youtube videos | ||
* Slack channel \* User community slack channel is available on nutanix.slack.com. Email [email protected] to gain entry. |