Git Product home page Git Product logo

hashicorp / terraform-provider-rancher2 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rancher/terraform-provider-rancher2

2.0 2.0 1.0 26.43 MB

This repository has moved to https://github.com/rancher/terraform-provider-rancher2

Home Page: https://github.com/rancher/terraform-provider-rancher2

License: Mozilla Public License 2.0

Makefile 0.14% Go 97.91% Shell 1.16% HTML 0.78% Ruby 0.01%

terraform-provider-rancher2's Introduction

Terraform Provider for Rancher v2

Go Report Card

Requirements

  • Terraform >= 0.11.x
  • Go 1.13 to build the provider plugin
  • Docker 17.03.x to run acceptance tests

Building The Provider

Clone repository to: $GOPATH/src/github.com/terraform-providers/terraform-provider-rancher2

$ mkdir -p $GOPATH/src/github.com/terraform-providers; cd $GOPATH/src/github.com/terraform-providers
$ git clone [email protected]:terraform-providers/terraform-provider-rancher2

Enter the provider directory and build the provider

$ cd $GOPATH/src/github.com/terraform-providers/terraform-provider-rancher2
$ make build

Using the provider

If you're building the provider, follow the instructions to install it as a plugin. After placing it into your plugins directory, run terraform init to initialize it. Documentation about the provider specific configuration options can be found on the provider's website.

Developing the Provider

If you wish to work on the provider, you'll first need Go installed on your machine (version 1.9+ is required). You'll also need to correctly setup a GOPATH, as well as adding $GOPATH/bin to your $PATH.

To compile the provider, run make build. This will build the provider and put the provider binary in $GOPATH/bin .

$ make build
...
$ $GOPATH/bin/terraform-provider-rancher2
...

To just compile provider binary on repo path and test on terraform:

$ make bin
$ terraform init
$ terraform plan
$ terraform apply

Testing the Provider

In order to test the provider, you can simply run make test.

$ make test

In order to run the full suite of Acceptance tests, a running rancher system, a rancher API key and a working k8s cluster imported are needed. Also, acceptance tests are covering Rancher server upgrade, v2.3.6 and v2.4.2

To run acceptance tests, you can simply run make testacc. scripts/gotestacc.sh will be run, deploying all needed requirements, running acceptance tests and cleanup.

$ make testacc

Due to network limitation on docker for osx and/or windows, there is a way to run dockerized acceptance test.

$ EXPOSE_HOST_PORTS=true make docker-testacc

terraform-provider-rancher2's People

Contributors

ajfriesen avatar armsnyder avatar axeal avatar bashofmann avatar bourne-id avatar caiges avatar cbron avatar cgriggs01 avatar cloudnautique avatar drpebcak avatar dstockton avatar ebauman avatar headcr4sh avatar hefeweizen avatar ibuildthecloud avatar jeffb4 avatar jordanjean avatar jpreese avatar keymon avatar lots0logs avatar oats87 avatar patrickdappollonio avatar paultyng avatar rawmind0 avatar rodcloutier avatar shpwrck avatar thomas-maurice avatar xescugc avatar zparnold avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

sourcegraph-ce

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.