Commit graph

128 commits

Author SHA1 Message Date
Hugo Blom 4dba34bd02 add cinder max attached volumes (#5089) 2019-08-19 23:45:32 -07:00
Hugo Blom da015e0249 Updated Openstack to terraform 0.12 (#5062)
* update openstack to terraform 0.12(.5)

* replace cluter.tf with cluster.tfvars

* update README.md to terraform 0.12

* update Openstack CI tests to use terraform 0.12

* specify terraform version in openstack README

* gitlab CI to copy cluster.tfvars in case of openstack provider

* The terraform/openstack dynamic inventory can read
tfstate v4 (generated by terraform 0.12) and convert them internally
ro v3 (as generated by terraform 0.11.x).

Additionally the script has been updated to Python 3.
2019-08-18 01:30:05 -07:00
Trond Hasle Amundsen 56ae3bfec2 Add support for IPv6 for Openstack in terraform.py via metadata (#4716)
* Add support for IPv6 for Openstack in terraform.py via metadata

* document terraform.py metadata variables for openstack
2019-06-09 23:01:05 -07:00
Vladimir Kiselev 045acc724b fix relative paths for bastion host template (#4126)
This is a fix for #4124
2019-06-05 01:51:55 -07:00
Robert Neumann 787a9c74fa Terraform wait for floating IP instance has been associated (#4321)
* Add wait for floating ip associate with instance

* Terraform formatting fix

* Sort Open Telekom Cloud in compatible list
2019-05-09 02:16:50 -07:00
Jiang Yi Tao f518b90c6b associate fips for masters with no etcd (#4657) 2019-04-28 22:58:20 -07:00
Maxime Guyot 37d98e79ec Pin Terraform provider versions (#4620) 2019-04-23 22:22:01 -07:00
rptaylor 873b5608cf add master_allowed_remote_ips (with terraform fmt) (#4022) 2019-04-21 01:57:44 -07:00
Maxime Guyot 1cf76a10db Disable usage of default security group (#4533) 2019-04-17 02:10:03 -07:00
Andreas Holmsten 7f1d9ff543 [contrib/terraform/openstack] Add k8s_allowed_remote_ips variable (#4506)
* Add k8s_allowed_remote_ips variable

Useful for defining CIDRs allowed to initiate a SSH connection when
you don't want to use a bastion.

* Add TF_VAR_k8s_allowed_remote_ips variable to tf-apply-ovh
2019-04-15 07:22:08 -07:00
Karen Almog 20ebb49568 Don't create security groups for a bastion host on openstack, if doesn't exist (#4291) 2019-04-09 04:01:09 -07:00
Matthew Mosesohn ec08303f82 Revert "Fix #4237: update kube cert path (#4354)" (#4369)
This reverts commit ea7a6f1cf1.

This change modified the certs dir for Kubernetes, but did not move the directories for existing clusters.
2019-03-20 05:56:57 -07:00
Dmitry Chepurovskiy ea7a6f1cf1 Fix #4237: update kube cert path (#4354) 2019-03-17 23:55:11 -07:00
Christian Berendt 44ee4b507c terraform: use openstackclient instead of novaclient (#4280)
The openstackclient is the preferred CLI for OpenStack
environments and should be used instead of novaclient.
2019-02-25 20:13:16 -08:00
Christian Berendt c386172be7 terraform: correct the spelling of Betacloud (#4282) 2019-02-25 19:38:32 -08:00
Ted Wexler b5a895d1ec Run 'terraform fmt' in contrib/terraform/openstack (#4242) 2019-02-17 21:04:41 -08:00
Robert Neumann 8b289ad9e1 Fix the file path for all.yml and k8s-cluster.yml (#4210) 2019-02-11 14:55:41 -08:00
Maxime Guyot 954676b3d8 Update the admin cert paths (#4135) 2019-02-11 14:10:10 -08:00
Petr Ruzicka 91e2d61cf2 Adding link to ../../contrib in README (#4097) 2019-01-31 14:44:06 -08:00
Andreas Holmsten 289be0a0db
Fix capitalisation 2018-11-05 12:47:23 +01:00
Andreas Holmsten 6c34745958
Add worker_allowed_ports
* [contrib/terraform/openstack] Add worker_allowed_ports

  Allow user to define in terraform template which ports and remote
  IPs that are allowed to access worker nodes. This is useful when you
  don't want to open up whole NodePort range to the outside world, or
  ports outside NodePort range.
2018-11-01 17:48:37 +01:00
Ted Wexler 58b4fea2b1 Add an 'access_ip' for openstack resources to the terraform inventory builder script (#3592)
* Add an 'access_ip' for openstack resources to the terraform inventory builder script

* Update Openstack README

* Only use ipv4

* If there's a floating IP assigned to an openstack instance, use that for access_ip
2018-10-29 19:28:23 +01:00
Maxime Guyot 38beab8fe8 Add support for router less deployments 2018-10-19 12:39:34 +02:00
Miouge1 6e34918b52 Add list of know working OpenStack clouds 2018-10-18 11:04:04 +02:00
SataQiu 9ca583d984 fix typo 2018-10-12 15:53:30 +08:00
Giacomo Longo 3f786542d3 Automatically infer bootstrap_os (#3498)
* Automatically infer bootstrap_os

* Rename bootstrap os to os_family
2018-10-10 23:32:10 -07:00
SataQiu 6f4054679e Remove the redundant space (#3418) 2018-09-29 20:31:57 -07:00
Andreas Holmsten 0a9a42b544 Change from Nova security groups to Neutron (#2910)
* Replace `openstack_compute_secgroup_v2` with `openstack_networking_secgroup_v2`

The `openstack_networking_secgroup_v2` resource allow specifications of
both ingress and egress. Nova security groups define ingress rules only.

This change will also allow for more user-friendly specified security
rules, as the different security group resources have different HCL
syntax.
2018-09-28 11:35:02 +02:00
rguichard 6650bc6b25 fix the output of router_id with the right id 2018-08-21 13:21:25 +02:00
Antoine Legrand a642931422
Merge pull request #3019 from holmsten/terraform-ops-worker-groups
[contrib/terraform/openstack] Add supplementary node groups
2018-08-16 16:06:53 +02:00
Rong Zhang 16bd0d2b5d
Merge pull request #2900 from drekle/configure_openstack_subnet_CIDR
Configure openstack subnet cidr
2018-08-07 17:27:01 +08:00
Rong Zhang 411d07a4f6
Merge pull request #3047 from rguichard/openstack-az-support
availability zones support for OpenStack
2018-08-07 16:51:41 +08:00
Rong Zhang 9172150966
Merge pull request #3044 from jerryrelmore/patch-4
Clarify etcd deployment script failure mechanism
2018-08-01 22:57:14 +08:00
rguichard c19643cee2 availability zones support for OpenStack
allow masters, nodes and gluster nodes (within each group) to be scheduled
on differents AZ.
2018-08-01 16:42:58 +02:00
Jerry Elmore 1385091768
Clarify etcd deployment script failure mechanism
Attempting to clarify the language surrounding the etcd node deployment script failure mechanism. I had this error when doing a new cluster deployment last night and, though it should have been, it wasn't immediately apparent to me what was causing the issue (since my default master node hostnames do not specify whether they are also acting as etcd replicas).
2018-07-31 15:15:49 -04:00
rguichard 1a38a9df88 add security groups for traffic to 30000-32767/tcp
This will make NodePort services work out of the box
2018-07-27 14:57:29 +02:00
Andreas Holmsten b900bd6e94
[contrib/terraform/openstack] Add supplementary node groups
* Add supplementary node groups

  To add additional ansible groups to the k8s nodes, such as
  `kube-ingress` for running ingress controller pods. Empty by default.
2018-06-28 16:46:20 +02:00
Derek Lemon 27d62941b2 Add the subnet_cidr as a required argument to the network module 2018-06-14 17:41:58 +00:00
Derek Lemon ab345c5f69 Change was not picked up 2018-06-14 17:31:04 +00:00
Derek Lemon a06f641b6c Configurable openstack subnet cidr 2018-06-14 16:40:32 +00:00
Pablo Moreno df6c5b28a1 [contrib/terraform/openstack] Backward compatibility changes (#2539)
* [terraform/openstack] Restores ability to use existing public nodes and masters as bastion.

* [terraform/openstack] Uses network_id as output

* [terraform/openstack] Fixes link to inventory/local/group_vars

* [terraform/openstack] Adds supplementary master groups

* [terraform/openstack] Updates documentation avoiding manual setups for bastion (as they are not needed now).

* [terraform/openstack] Supplementary master groups in docs.

* [terraform/openstack] Fixes repeated usage of master fips instead of bastion fips

* [terraform/openstack] Missing change for network_id to subnet_id

* [terraform/openstack] Changes conditional to element( concat ) form to avoid type issues with empty lists.
2018-04-30 18:11:07 +03:00
avoidik 26caad4f12 Allow ansible_ssh_private_key_file for Openstack 2018-03-31 02:38:01 +03:00
avoidik 076b5c153f Return subnet_id as defined in kubespray.tf 2018-03-27 11:13:36 +03:00
Spencer Smith 2132ec0269
Merge pull request #2378 from dleske/reorg-inventory-for-opst
Update OpenStack contrib to use per-cluster inventory layout
2018-03-09 15:21:21 -05:00
Drew Leske b6698e686a
Update README.md with minor fixes/clarifications 2018-02-23 16:54:13 -08:00
Drew Leske 66bd570584
Update README.md with minor fixes and cleanup 2018-02-23 15:05:29 -08:00
Drew Leske e2c5a3895b Rename sample inventory directory to be less awkward 2018-02-23 14:39:31 -08:00
Drew Leske fe719c1bc1 Update OpenStack contrib to use per-cluster inventory layout
Supports Kubespray workspace with multiple OpenStack-deployed k8s
clusters.

* Create sample inventory directory for template
* Moved broken `group_vars` symlink to sample directory
* Created sample cluster Terraform file
* Updated documentation
2018-02-23 12:08:45 -08:00
Drew Leske 89fe6505f9 Correct use of deprecated argument to TF/OpenStack module
https://www.terraform.io/docs/providers/openstack/r/networking_router_v2.html#external_gateway
2018-02-22 22:41:19 -08:00
Aivars Sterns bfe196236f
Merge pull request #2033 from ArchiFleKs/terraform-fix-cred
Update Terraform docs and authentication method
2018-02-21 12:16:24 +02:00
Wong Hoi Sing Edison 1a1d154e14 Support multiple inventory files under individual inventory directory 2018-02-08 08:08:15 +08:00
ArchiFleKs 20779df686 remove kube-node from master node by default 2018-01-17 19:02:02 +01:00
ArchiFleKs ba7b1d74d0 remove user_data which may mess up /etc/hosts 2018-01-17 14:29:23 +01:00
ArchiFleKs 74fd975b57 run terraform FMT for readability 2018-01-05 12:09:04 +01:00
ArchiFleKs 6eb6e806e7 Update Terraform docs and authentication method
Hardcoded variables are removed from variables.tf file because it might
not be suitable for all OpenStack Cloud depending on Identity API
version available (between v2 or v3) and preferred authentication
method.
2018-01-05 11:25:37 +01:00
BenGalewsky 591ae700ce Update OpenStack Terraform: Modules, Bastions, and New Floating IP config (#1958)
* Adding bastion and private network provisioning for openstack terraform

* Remove usage of floating-ip property

* Combine openstack instances + floating ips

* Fix relating floating IPs to hosts for openstack builds

* Tighten up security groups

Allow ssh into all instances with floating IP

* Add the gluster hosts to the no-floating group

* Break terraform into modules

* Update README and var descriptions to match current config

* Remove volume property in gluster compute def

* Include cluster name in internal network and router names

* Make dns_nameservers a variable
2017-12-05 12:48:47 +00:00
Simon Li 74d54946bf Add note that glusterfs is not automatically deployed (#1834) 2017-10-18 13:26:14 +01:00
Pablo Moreno c819238da9 Adds support for separate etcd machines on terraform/openstack deployment (#1674) 2017-09-27 10:59:09 +01:00
Alexander Chumakov 03572d175f [terraform/openstack] fixed mistake in README.md 2017-07-26 17:42:44 +03:00
Alexander Chumakov f3165a716a Add more config to README.md
Add resolvconf_mode and cloud_provider config description to README.md
2017-07-11 12:46:19 +03:00
Alexander Chumakov 442be2ac02 [terraform/openstack] README.md Guide expanded
Add section how to configure k8s cluster and set up kubectl
2017-07-10 18:53:57 +03:00
Brad Beam 55f6b6a6ab Merge pull request #940 from Connz/patch-1
Fixed nova command to get available flavors
2017-05-16 21:24:07 -05:00
Connz 28473e919f Fixed nova command to get available flavors
The nova command for getting the flavors is not
nova list-flavors
but
nova flavor-list
2017-03-09 11:10:25 +01:00
Pablo Moreno cf26585cff Restores working order of contrib/terraform/openstack, includes vault group and avoids group_vars/k8s-cluster.yml 2017-03-02 23:58:07 +00:00
Bogdan Dobrelya 712872efba Rework inventory all by real groups' vars
* Leave all.yml to keep only optional vars
* Store groups' specific vars by existing group names
* Fix optional vars casted as mandatory (add default())
* Fix missing defaults for an optional IP var
* Relink group_vars for terraform to reflect changes

Signed-off-by: Bogdan Dobrelya <bogdando@mail.ru>
2017-02-23 09:43:42 +01:00
Bogdan Dobrelya 85a8a54d3e Merge pull request #935 from sc68cal/terraform_groupvars_update
Update the group_vars for Terraform
2017-01-24 11:33:17 +01:00
Sean M. Collins 73160c9b90 Update terraform's group_vars to be a symlink
That way, it will not become stale.

Related bug #929
2017-01-23 16:08:37 -05:00
Sean M. Collins 2184d6a3ff Specify the version of the credentials to download from Horizon
More recent versions of OpenStack Horizon provide Identity v2 and
Identity v3 versions of the RC file.
2017-01-23 14:52:51 -05:00
Alexander Block 1d2a18b355 Introduce dns_mode and resolvconf_mode and implement docker_dns mode
Also update reset.yml to do more dns/network related cleanup.
2017-01-05 23:38:51 +01:00
Bogdan Dobrelya f7447837c5 Rename CoreOS fact
Signed-off-by: Bogdan Dobrelya <bogdando@mail.ru>
2017-01-05 14:02:29 +01:00
Alexander Block f12e9fa22a Delete .tfstate and .tfstate.backup from openstack terraform 2016-12-13 15:37:04 +01:00
Bogdan Dobrelya 284a21012c Fix bad symlink
Signed-off-by: Bogdan Dobrelya <bdobrelia@mirantis.com>
2016-12-09 13:34:52 +01:00
Bogdan Dobrelya e9c591e6de Symlink global vars for terraform
Signed-off-by: Bogdan Dobrelya <bdobrelia@mirantis.com>
2016-12-08 12:07:01 +01:00
Pablo Moreno 27e239c8d6 GlusterFS with external VMs, terraform/os included 2016-12-06 11:03:13 +00:00
Bogdan Dobrelya a03540dabc Add download localhost and enable for CI
* Add download_localhost for the download_run_once mode, which is
  use the ansible host (a travis node for CI case) to store and
  distribute containers across cluster nodes in inventory.
  Defaults to false.
* Rework download_run_once logic to fix idempotency of uploading
  containers.
* For Travis CI, enable docker images caching and run Travis
  workers with sudo enabled as a dependency
* For Travis CI, deploy with download_localhost and download_run_once
  enabled to shourten dev path drastically.
* Add compression for saved container images. Defaults to 'best'.

Signed-off-by: Bogdan Dobrelya <bdobrelia@mirantis.com>
Co-authored-by: Aleksandr Didenko <adidenko@mirantis.com>
2016-11-18 16:00:07 +01:00
sneumann e9a48770a7 Fix sugested bootstrap options 2016-11-15 17:52:35 +01:00
Matthew Mosesohn f106bf5bc4 adds ability to have hosts with no floating ips on terraform/openstack (+8 squashed commits)
Squashed commits:
[f9355ea] Swap order in which we reload docker/socket
[2ca6819] Reload docker.socket after installing flannel on coreos

Workaround for #569
[9f976e5] Vagrantfile: setup proxy inside virtual machines

In corporate networks, it is good to pre-configure proxy variables.
[9d7142f] Vagrantfile: use Ubuntu 16.04 LTS

Use recent supported version of Ubuntu for local development setup
with Vagrant.
[50f77cc] Add CI test layouts

* Drop Wily from test matrix
* Replace the Wily cases dropped with extra cases to test separate
  roles deployment

Signed-off-by: Bogdan Dobrelya <bdobrelia@mirantis.com>
[03e162b] Update OWNERS
[c7b00ca] Use tar+register instead of copy/slurp for distributing tokens and certs

Related bug: https://github.com/ansible/ansible/issues/15405

Uses tar and register because synchronize module cannot sudo on the
remote side correctly and copy is too slow.

This patch dramatically cuts down the number of tasks to process
for cert synchronization.
[2778ac6] Add new var skip_dnsmasq_k8s

If skip_dnsmasq is set, it will still not set up dnsmasq
k8s pod. This enables independent setup of resolvconf section
before kubelet is up.
2016-11-07 10:53:13 +00:00
Paul Czarkowski e924504928 WIP: terraform openstack 2016-06-05 15:52:20 -05:00