Capgemini / kubeform

Form your :boat: Kubernetes :anchor: cluster anywhere using CoreOS, Terraform and Ansible
https://capgemini.github.io/kubeform
MIT License
326 stars 57 forks source link

Partial support for Terraform 0.7.x #170

Closed mrwacky42 closed 7 years ago

mrwacky42 commented 7 years ago

This fixes a couple obvious problems, but there is still much to be done. I gave up on this however.

terraform plan generates a clean plan, but it fails part way through (sorry I didn't save logs and am not going to go back right now). Then terraform plan -destroy fails to generate a plan because of "foo should be list but got string" type errors (or vice versa, I forget already). These errors were in some of the modules.

The file, etcd_discovery_url.txt is committed to the repo, but also in .gitignore. That makes it "hard" to remove, but it should be removed. I've also updated docs to show how to generate a new etcd_discovery_url.txt at the beginning.

mrwacky42 commented 7 years ago

See also #153

tamsky commented 7 years ago

https://gist.github.com/tamsky/8748e19fad3c5cb733f66646df3bf945 contains a full plan / apply / error output.

Errors only pasted here:

Error applying plan:

11 error(s) occurred:

* variable subnets in module master_elb should be type string, got list
* variable instances in module master_elb should be type string, got list
* variable ip_addresses in module kube_master_certs should be type string, got list
* variable deploy_ssh_hosts in module kube_master_certs should be type string, got list
* variable ip_addresses_list in module docker_client_certs should be type string, got list
* variable ip_addresses in module kube_kubelet_certs should be type string, got list
* variable ip_addresses_list in module docker_daemon_certs should be type string, got list
* variable deploy_ssh_hosts in module docker_daemon_certs should be type string, got list
* variable deploy_ssh_hosts in module kube_kubelet_certs should be type string, got list
* variable deploy_ssh_hosts in module docker_client_certs should be type string, got list
* variable deploy_ssh_hosts in module ca should be type string, got list

# terraform version
Terraform v0.7.10
tamsky commented 7 years ago

After fixing those errors in https://github.com/Capgemini/tf_tls/compare/master...tamsky:master I now get:

Error applying plan:

16 error(s) occurred:

* aws_elb.kube_master: InvalidConfigurationRequest: ELB cannot be attached to multiple subnets in the same AZ.
        status code: 409, request id: c8fecb04-abaa-11e6-8200-e3b4d8594e24
* triggers: 1 error(s) decoding:

* '[ip_addresses_list]' expected type 'string', got unconvertible type '[]interface {}'
* triggers: 1 error(s) decoding:

* '[ip_addresses_list]' expected type 'string', got unconvertible type '[]interface {}'
* triggers: 1 error(s) decoding:

* '[ip_addresses_list]' expected type 'string', got unconvertible type '[]interface {}'
* triggers: 1 error(s) decoding:

* '[ip_addresses_list]' expected type 'string', got unconvertible type '[]interface {}'
* triggers: 1 error(s) decoding:

* '[ip_addresses_list]' expected type 'string', got unconvertible type '[]interface {}'
* triggers: 1 error(s) decoding:

* '[ip_addresses]' expected type 'string', got unconvertible type '[]interface {}'
* triggers: 1 error(s) decoding:

* '[ip_addresses]' expected type 'string', got unconvertible type '[]interface {}'
* triggers: 1 error(s) decoding:

* '[ip_addresses]' expected type 'string', got unconvertible type '[]interface {}'
* triggers: 1 error(s) decoding:

* '[ip_addresses]' expected type 'string', got unconvertible type '[]interface {}'
* triggers: 1 error(s) decoding:

* '[ip_addresses]' expected type 'string', got unconvertible type '[]interface {}'
* triggers: 1 error(s) decoding:

* '[ip_addresses_list]' expected type 'string', got unconvertible type '[]interface {}'
* triggers: 1 error(s) decoding:

* '[ip_addresses_list]' expected type 'string', got unconvertible type '[]interface {}'
* triggers: 1 error(s) decoding:

* '[ip_addresses_list]' expected type 'string', got unconvertible type '[]interface {}'
* triggers: 1 error(s) decoding:

* '[ip_addresses_list]' expected type 'string', got unconvertible type '[]interface {}'
* triggers: 1 error(s) decoding:

* '[ip_addresses_list]' expected type 'string', got unconvertible type '[]interface {}'.
enxebre commented 7 years ago

hey @mrwacky42 Thanks for this. I did some work a while ago that might be useful here and may be related to @tamsky output. See https://github.com/Capgemini/kubeform/pull/86/files and https://github.com/Capgemini/tf_tls/pull/38/files

tamsky commented 7 years ago

@enxebre thanks for pointing those out. those really helped.

I've got the terraform bits working well for terraform-0.7.11 tf_tls: https://github.com/tamsky/tf_tls/commit/5b745baa56d089ec66361e9ae975ef5a8aab4553 kubeform: https://github.com/tamsky/kubeform/commit/9dea01b606b8d3c225acb8d63c8388ae1354f677 (my kubeform fork above 1) uses modules in my tf_tls fork, and 2) is configured for us-west-2 region/az)

tamsky commented 7 years ago

If I continue to try to use kubeform I'll file new issues for the ansible-playbook errors.

methril commented 7 years ago

@tamsky I have fixed the terraform-0.7x for DigitalOcean. I will push a pull request on your repo as most of the proper changes are on your repository.

mrwacky42 commented 7 years ago

Probably we can close this PR, as I've moved on from kubeform, and @tamsky has done much more complete work.

tamsky commented 7 years ago

@mrwacky42 agree we can close this.