Skip to content
This repository has been archived by the owner on Feb 5, 2020. It is now read-only.

Commit

Permalink
decouple assets and ignition from main bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
enxebre committed Jan 30, 2018
1 parent ad15908 commit 35ec637
Show file tree
Hide file tree
Showing 65 changed files with 970 additions and 905 deletions.
53 changes: 11 additions & 42 deletions config.tf
Original file line number Diff line number Diff line change
Expand Up @@ -74,17 +74,17 @@ variable "tectonic_container_images" {
etcd = "quay.io/coreos/etcd:v3.2.14"
etcd_operator = "quay.io/coreos/etcd-operator:v0.5.0"
hyperkube = "quay.io/coreos/hyperkube:v1.9.1_coreos.0"
kube_core_renderer = "quay.io/coreos/kube-core-renderer-dev:79403c0864d4a98773d92d01998124c096faf59f"
kube_version_operator = "quay.io/coreos/kube-version-operator:v1.8.4-kvo.5"
kube_core_renderer = "quay.io/coreos/kube-core-renderer:beryllium-m1"
kube_core_operator = "quay.io/coreos/kube-core-operator:beryllium-m1"
tectonic_channel_operator = "quay.io/coreos/tectonic-channel-operator:0.6.2"
tectonic_etcd_operator = "quay.io/coreos/tectonic-etcd-operator:v0.0.2"
tectonic_prometheus_operator = "quay.io/coreos/tectonic-prometheus-operator:v1.9.0"
tectonic_prometheus_operator = "quay.io/coreos/tectonic-prometheus-operator:v1.9.1"
tectonic_cluo_operator = "quay.io/coreos/tectonic-cluo-operator:v0.3.0"
tectonic_torcx = "quay.io/coreos/tectonic-torcx:v0.2.0"
kubernetes_addon_operator = "quay.io/coreos/kubernetes-addon-operator:4b83569d763dc95e1f61c77b31989fd3957bfc67"
tectonic_torcx = "quay.io/coreos/tectonic-torcx:v0.2.1"
kubernetes_addon_operator = "quay.io/coreos/kubernetes-addon-operator:beryllium-m1"
tectonic_alm_operator = "quay.io/coreos/tectonic-alm-operator:0.2.1"
tectonic_utility_operator = "quay.io/coreos/tectonic-utility-operator:fd342530b94b0addf41b3109d1fcd3adfd7f2101"
tectonic_network_operator = "quay.io/coreos/tectonic-network-operator:5de83dde5aab8532cb5d1046de3f04193ac2d827"
tectonic_utility_operator = "quay.io/coreos/tectonic-utility-operator:beryllium-m1"
tectonic_network_operator = "quay.io/coreos/tectonic-network-operator:beryllium-m1"
}
}

Expand All @@ -97,13 +97,14 @@ variable "tectonic_container_base_images" {
config_reload = "quay.io/coreos/configmap-reload"
addon_resizer = "quay.io/coreos/addon-resizer"
kube_state_metrics = "quay.io/coreos/kube-state-metrics"
grafana = "quay.io/coreos/grafana-monitoring"
grafana = "quay.io/coreos/monitoring-grafana"
grafana_watcher = "quay.io/coreos/grafana-watcher"
prometheus_operator = "quay.io/coreos/prometheus-operator"
prometheus_config_reload = "quay.io/coreos/prometheus-config-reloader"
prometheus = "quay.io/prometheus/prometheus"
alertmanager = "quay.io/prometheus/alertmanager"
node_exporter = "quay.io/prometheus/node-exporter"
kube_rbac_proxy = "quay.io/brancz/kube-rbac-proxy"
}
}

Expand All @@ -113,8 +114,8 @@ variable "tectonic_versions" {

default = {
etcd = "3.2.14"
kubernetes = "1.8.4+tectonic.1"
monitoring = "1.9.0"
kubernetes = "1.9.1+tectonic.1"
monitoring = "1.9.1"
tectonic = "1.8.4-tectonic.2"
tectonic-etcd = "0.0.1"
cluo = "0.3.0"
Expand Down Expand Up @@ -166,7 +167,6 @@ variable "tectonic_etcd_count" {
description = <<EOF
The number of etcd nodes to be created.
If set to zero, the count of etcd nodes will be determined automatically.
Note: This is not supported on bare metal.
EOF
}
Expand All @@ -177,7 +177,6 @@ variable "tectonic_etcd_servers" {
Needs to be set if using an external etcd cluster.
Note: If this variable is defined, the installer will not create self-signed certs.
To provide a CA certificate to trust the etcd servers, set "tectonic_etcd_ca_cert_path".
Example: `["etcd1", "etcd2", "etcd3"]`
EOF

Expand All @@ -191,7 +190,6 @@ variable "tectonic_etcd_ca_cert_path" {

description = <<EOF
(optional) The path of the file containing the CA certificate for TLS communication with etcd.
Note: This works only when used in conjunction with an external etcd cluster.
If set, the variable `tectonic_etcd_servers` must also be set.
EOF
Expand All @@ -203,7 +201,6 @@ variable "tectonic_etcd_client_cert_path" {

description = <<EOF
(optional) The path of the file containing the client certificate for TLS communication with etcd.
Note: This works only when used in conjunction with an external etcd cluster.
If set, the variables `tectonic_etcd_servers`, `tectonic_etcd_ca_cert_path`, and `tectonic_etcd_client_key_path` must also be set.
EOF
Expand All @@ -215,7 +212,6 @@ variable "tectonic_etcd_client_key_path" {

description = <<EOF
(optional) The path of the file containing the client key for TLS communication with etcd.
Note: This works only when used in conjunction with an external etcd cluster.
If set, the variables `tectonic_etcd_servers`, `tectonic_etcd_ca_cert_path`, and `tectonic_etcd_client_cert_path` must also be set.
EOF
Expand All @@ -227,12 +223,9 @@ variable "tectonic_base_domain" {
description = <<EOF
The base DNS domain of the cluster. It must NOT contain a trailing period. Some
DNS providers will automatically add this if necessary.
Example: `openstack.dev.coreos.systems`.
Note: This field MUST be set manually prior to creating the cluster.
This applies only to cloud platforms.
[Azure-specific NOTE]
To use Azure-provided DNS, `tectonic_base_domain` should be set to `""`
If using DNS records, ensure that `tectonic_base_domain` is set to a properly configured external DNS zone.
Expand All @@ -246,7 +239,6 @@ variable "tectonic_cluster_name" {
description = <<EOF
The name of the cluster.
If used in a cloud-environment, this will be prepended to `tectonic_base_domain` resulting in the URL to the Tectonic console.
Note: This field MUST be set manually prior to creating the cluster.
Warning: Special characters in the name like '.' may cause errors on OpenStack platforms due to resource name constraints.
EOF
Expand All @@ -261,11 +253,8 @@ The path the pull secret file in JSON format.
This is known to be a "Docker pull secret" as produced by the docker login [1] command.
A sample JSON content is shown in [2].
You can download the pull secret from your Account overview page at [3].
[1] https://docs.docker.com/engine/reference/commandline/login/
[2] https://coreos.com/os/docs/latest/registry-authentication.html#manual-registry-auth-setup
[3] https://account.coreos.com/overview
EOF
}
Expand All @@ -277,7 +266,6 @@ variable "tectonic_license_path" {
description = <<EOF
The path to the tectonic licence file.
You can download the Tectonic license file from your Account overview page at [1].
[1] https://account.coreos.com/overview
EOF
}
Expand All @@ -288,7 +276,6 @@ variable "tectonic_container_linux_channel" {

description = <<EOF
(optional) The Container Linux update channel.
Examples: `stable`, `beta`, `alpha`
EOF
}
Expand All @@ -299,7 +286,6 @@ variable "tectonic_container_linux_version" {

description = <<EOF
The Container Linux version to use. Set to `latest` to select the latest available version for the selected update channel.
Examples: `latest`, `1465.6.0`
EOF
}
Expand Down Expand Up @@ -329,7 +315,6 @@ variable "tectonic_admin_email" {
(internal) The e-mail address used to:
1. login as the admin user to the Tectonic Console.
2. generate DNS zones for some providers.
Note: This field MUST be in all lower-case e-mail address format and set manually prior to creating the cluster.
EOF
}
Expand All @@ -339,7 +324,6 @@ variable "tectonic_admin_password" {

description = <<EOF
(internal) The admin user password to login to the Tectonic Console.
Note: This field MUST be set manually prior to creating the cluster. Backslashes and double quotes must
also be escaped.
EOF
Expand Down Expand Up @@ -399,7 +383,6 @@ variable "tectonic_ddns_server" {

description = <<EOF
(optional) This only applies if you use the modules/dns/ddns module.
Specifies the RFC2136 Dynamic DNS server IP/host to register IP addresses to.
EOF
}
Expand All @@ -410,7 +393,6 @@ variable "tectonic_ddns_key_name" {

description = <<EOF
(optional) This only applies if you use the modules/dns/ddns module.
Specifies the RFC2136 Dynamic DNS server key name.
EOF
}
Expand All @@ -421,7 +403,6 @@ variable "tectonic_ddns_key_algorithm" {

description = <<EOF
(optional) This only applies if you use the modules/dns/ddns module.
Specifies the RFC2136 Dynamic DNS server key algorithm.
EOF
}
Expand All @@ -432,7 +413,6 @@ variable "tectonic_ddns_key_secret" {

description = <<EOF
(optional) This only applies if you use the modules/dns/ddns module.
Specifies the RFC2136 Dynamic DNS server key secret.
EOF
}
Expand All @@ -442,13 +422,9 @@ variable "tectonic_networking" {

description = <<EOF
(optional) Configures the network to be used in Tectonic. One of the following values can be used:
- "flannel": enables overlay networking only. This is implemented by flannel using VXLAN.
- "canal": [ALPHA] enables overlay networking including network policy. Overlay is implemented by flannel using VXLAN. Network policy is implemented by Calico.
- "calico-ipip": [ALPHA] enables BGP based networking. Routing and network policy is implemented by Calico. Note this has been tested on baremetal installations only.
- "none": disables the installation of any Pod level networking layer provided by Tectonic. By setting this value, users are expected to deploy their own solution to enable network connectivity for Pods and Services.
EOF
}
Expand Down Expand Up @@ -487,7 +463,6 @@ variable "tectonic_http_proxy_address" {

description = <<EOF
(optional) HTTP proxy address.
Example: `http://myproxy.example.com`
EOF
}
Expand All @@ -498,7 +473,6 @@ variable "tectonic_https_proxy_address" {

description = <<EOF
(optional) HTTPS proxy address.
Example: `http://myproxy.example.com`
EOF
}
Expand All @@ -509,11 +483,6 @@ variable "tectonic_no_proxy" {

description = <<EOF
(optional) List of local endpoints that will not use HTTP proxy.
Example: `["127.0.0.1","localhost",".example.com","10.3.0.1"]`
EOF
}

variable "tectonic_ncg_dev_secret" {
type = "string"
}
37 changes: 0 additions & 37 deletions modules/aws/etcd/ignition.tf

This file was deleted.

25 changes: 0 additions & 25 deletions modules/aws/etcd/ignition_s3.tf

This file was deleted.

13 changes: 11 additions & 2 deletions modules/aws/etcd/nodes.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
locals {
ami_owner = "595879546273"
arn = "aws"
ami_owner = "595879546273"
arn = "aws"
ignition_etcd_keys = ["ignition_etcd_0.json", "ignition_etcd_1.json", "ignition_etcd_2.json"]
}

data "aws_ami" "coreos_ami" {
Expand Down Expand Up @@ -98,6 +99,14 @@ resource "aws_iam_role_policy" "etcd" {
EOF
}

data "ignition_config" "s3" {
count = "${length(var.external_endpoints) == 0 ? var.instance_count : 0}"

replace {
source = "${format("s3://%s/%s", var.s3_bucket, local.ignition_etcd_keys[count.index])}"
}
}

resource "aws_instance" "etcd_node" {
count = "${length(var.external_endpoints) == 0 ? var.instance_count : 0}"
ami = "${coalesce(var.ec2_ami, data.aws_ami.coreos_ami.image_id)}"
Expand Down
20 changes: 1 addition & 19 deletions modules/aws/etcd/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,6 @@ variable "ec2_type" {
type = "string"
}

variable "ec2_ami" {
type = "string"
default = ""
}

variable "extra_tags" {
description = "Extra AWS tags to be applied to created resources."
type = "map"
Expand Down Expand Up @@ -74,18 +69,10 @@ variable "sg_ids" {
description = "The security group IDs to be applied."
}

variable "ign_etcd_dropin_id_list" {
type = "list"
}

variable "s3_bucket" {
type = "string"
}

variable "ign_etcd_crt_id_list" {
type = "list"
}

variable "etcd_iam_role" {
type = "string"
default = ""
Expand All @@ -97,12 +84,7 @@ variable "dns_server_ip" {
default = ""
}

variable "ign_profile_env_id" {
type = "string"
default = ""
}

variable "ign_systemd_default_env_id" {
variable "ec2_ami" {
type = "string"
default = ""
}
Loading

0 comments on commit 35ec637

Please sign in to comment.