Skip to content
This repository has been archived by the owner on Jan 11, 2018. It is now read-only.

Config rework #3

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
5c55564
allowing for http api to be used for fleet provider
brendangibat Oct 27, 2015
738ebee
fixing hook that returns null api for api client
brendangibat Oct 28, 2015
830c568
adding in etcd client for fleet v0.10.2 (need to update next to using…
brendangibat Oct 28, 2015
cd25c63
changing around to make code flow better
brendangibat Oct 28, 2015
07b193a
updating comments
brendangibat Oct 28, 2015
f506ec6
updating outputed text and fallthrough on empty string for tunnel
brendangibat Oct 30, 2015
67d9b0f
adding test for empty tunnel endpoint
brendangibat Oct 30, 2015
db56e45
updating readme and etcd config value
brendangibat Oct 30, 2015
7769f61
mimicking fleetctl a little better
brendangibat Oct 30, 2015
0d3546a
mixing up endpoints
brendangibat Oct 30, 2015
0941405
not showing port 4001 so as to not confuse people about the api endpoint
brendangibat Oct 30, 2015
d370dfb
changing name for golint
brendangibat Oct 30, 2015
8e4fb59
frist pass at making client generation like fleetctl
brendangibat Oct 30, 2015
d4a72e8
fixing fleetctl mimicing configuration
brendangibat Oct 31, 2015
d2532b0
updating readme on config
brendangibat Oct 31, 2015
c5d493c
fixing a few more readme values
brendangibat Oct 31, 2015
d7dc9c5
updating comments and tests
brendangibat Nov 2, 2015
b86de93
adding in example config
brendangibat Nov 2, 2015
fda194f
fixing using underscores instead of dashes
brendangibat Nov 2, 2015
98386dd
removing param that doesn't exist
brendangibat Nov 2, 2015
94996e4
removing unused imports
brendangibat Nov 2, 2015
8a154f0
updating test comments
brendangibat Nov 2, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
bin/*
terraform-provider-fleet

69 changes: 68 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,78 @@ A plugin for Terraform enabling it to manipulate

## Usage

This terraform plugin supports the same connections as fleetctl. The
configuration mimics the fleetctl tool as well.

Here are the configuration names, default values, descriptions, and required
values from the terraform provider schema:

- driver
* Description: Adapter used to execute fleetctl commands. Options include api and etcd.
* Default: "api"
- endpoint
* Description: Location of the fleet API if --driver=api. Alternatively, if --driver=etcd, location of the etcd API.
* Default: "unix:///var/run/fleet.sock"
- etcd-key-prefix
* Description: Keyspace for fleet data in etcd (development use only!)
- key-file
* Default: /var/run/fleet.sock
* Description: Location of TLS key file used to secure communication with the fleet API or etcd
- cert-file
* Description: Location of TLS cert file used to secure communication with the fleet API or etcd
* Default:
- ca-file
* Description: Location of TLS CA file used to secure communication with the fleet API or etcd
* Default:
- tunnel
* Description: Establish an SSH tunnel through the provided address for communication with fleet and etcd.
* Default:
- known-hosts-file
* Description: File used to store remote machine fingerprints. Ignored if strict host key checking is disabled.
* Default: ssh.DefaultKnownHostsFile
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is ~/.fleetctl/known_hosts

- ssh-username
* Description: Username to use when connecting to CoreOS instance.
* Default: "core"
- strict-host-key-checking
* Description: Verify host keys presented by remote machines before initiating SSH connections.
* Default: true
- ssh-timeout
* Description: Amount of time in seconds to allow for SSH connection initialization before failing.
* Default: 10.0
- request-timeout
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like these options need the - replaced with _

* Description: Amount of time in seconds to allow a single request before considering it failed.
* Default: 3.0

EX:

```
provider "fleet" {
driver = "etcd"
endpoint = "http://192.168.0.1:4001"
// etcd_key_prefix can be ommited to use the default value
etcd_key_prefix = "/_some/_weird/etcd/prefix"
}
```

```
provider "fleet" {
driver = "api"
endpoint = "http://192.168.0.1:8080"
}
```

```
provider "fleet" {
tunnel = "10.0.0.1:22"
ssh_username = "not_core"
}
```

There is only one resource: `fleet_unit`. Here is the first example from
[the Fleet introduction][3], transcribed to Terraform:

provider "fleet" {
tunnel_address = "IP_OR_HOSTNAME_OF_A_COREOS_HOST"
endpoint = "IP_OR_HOSTNAME_OF_A_COREOS_HOST"
}

resource "fleet_unit" "myapp" {
Expand Down
Loading