Skip to content

Commit 66ef3be

Browse files
committed
*: remove support for container linux
This drops a number of configuration options that are specific to Container Linux. This also changes the default region to us-east-1 throughout the tests.
1 parent b789c79 commit 66ef3be

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+131
-647
lines changed

config.tf

Lines changed: 8 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -59,18 +59,17 @@ variable "tectonic_container_images" {
5959
default = {
6060
addon_resizer = "gcr.io/google_containers/addon-resizer:2.1"
6161
bootkube = "quay.io/coreos/bootkube:v0.10.0"
62-
tnc_operator = "quay.io/coreos/tectonic-node-controller-operator-dev:436b1b4395ae54d866edc88864c9b01797cebac1"
62+
tnc_operator = "quay.io/coreos/tectonic-node-controller-operator-dev:0a24db2288f00b10ced358d9643debd601ffd0f1"
6363
etcd_cert_signer = "quay.io/coreos/kube-etcd-signer-server:678cc8e6841e2121ebfdb6e2db568fce290b67d6"
6464
etcd = "quay.io/coreos/etcd:v3.2.14"
65-
hyperkube = "openshift/origin-node:latest"
66-
kube_core_renderer = "quay.io/coreos/kube-core-renderer-dev:436b1b4395ae54d866edc88864c9b01797cebac1"
67-
kube_core_operator = "quay.io/coreos/kube-core-operator-dev:436b1b4395ae54d866edc88864c9b01797cebac1"
68-
tectonic_channel_operator = "quay.io/coreos/tectonic-channel-operator-dev:436b1b4395ae54d866edc88864c9b01797cebac1"
69-
kube_addon_operator = "quay.io/coreos/kube-addon-operator-dev:436b1b4395ae54d866edc88864c9b01797cebac1"
65+
kube_core_renderer = "quay.io/coreos/kube-core-renderer-dev:0a24db2288f00b10ced358d9643debd601ffd0f1"
66+
kube_core_operator = "quay.io/coreos/kube-core-operator-dev:0a24db2288f00b10ced358d9643debd601ffd0f1"
67+
tectonic_channel_operator = "quay.io/coreos/tectonic-channel-operator-dev:0a24db2288f00b10ced358d9643debd601ffd0f1"
68+
kube_addon_operator = "quay.io/coreos/kube-addon-operator-dev:0a24db2288f00b10ced358d9643debd601ffd0f1"
7069
tectonic_alm_operator = "quay.io/coreos/tectonic-alm-operator:v0.3.1"
71-
tectonic_ingress_controller_operator = "quay.io/coreos/tectonic-ingress-controller-operator-dev:436b1b4395ae54d866edc88864c9b01797cebac1"
72-
tectonic_utility_operator = "quay.io/coreos/tectonic-utility-operator-dev:436b1b4395ae54d866edc88864c9b01797cebac1"
73-
tectonic_network_operator = "quay.io/coreos/tectonic-network-operator-dev:436b1b4395ae54d866edc88864c9b01797cebac1"
70+
tectonic_ingress_controller_operator = "quay.io/coreos/tectonic-ingress-controller-operator-dev:0a24db2288f00b10ced358d9643debd601ffd0f1"
71+
tectonic_utility_operator = "quay.io/coreos/tectonic-utility-operator-dev:0a24db2288f00b10ced358d9643debd601ffd0f1"
72+
tectonic_network_operator = "quay.io/coreos/tectonic-network-operator-dev:0a24db2288f00b10ced358d9643debd601ffd0f1"
7473
}
7574
}
7675

@@ -192,26 +191,6 @@ You can download the pull secret from your Account overview page at [3].
192191
EOF
193192
}
194193

195-
variable "tectonic_container_linux_channel" {
196-
type = "string"
197-
198-
description = <<EOF
199-
The Container Linux update channel.
200-
201-
Examples: `stable`, `beta`, `alpha`
202-
EOF
203-
}
204-
205-
variable "tectonic_container_linux_version" {
206-
type = "string"
207-
208-
description = <<EOF
209-
The Container Linux version to use. Set to `latest` to select the latest available version for the selected update channel.
210-
211-
Examples: `latest`, `1465.6.0`
212-
EOF
213-
}
214-
215194
variable "tectonic_update_server" {
216195
type = "string"
217196
default = "https://tectonic.update.core-os.net"

examples/tectonic.aws.yaml

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@ admin:
33
password: "verysecure"
44
sshKey: "ssh-ed25519 AAAA..."
55
aws:
6-
# (optional) Unique name under which the Amazon S3 bucket will be created. Bucket name must start with a lower case name and is limited to 63 characters.
7-
# The Tectonic Installer uses the bucket to store tectonic assets and kubeconfig.
8-
# If name is not provided the installer will construct the name using "name", current AWS region and "baseDomain"
9-
# assetsS3BucketName:
10-
116
# (optional) AMI override for all nodes. Example: `ami-foobar123`.
127
# ec2AMIOverride:
138

@@ -95,7 +90,7 @@ aws:
9590
# publicEndpoints: true
9691

9792
# The target AWS region for the cluster.
98-
region: eu-west-1
93+
region: us-east-1
9994

10095
# Block of IP addresses used by the VPC.
10196
# This should not overlap with any other networks, such as a private datacenter connected via Direct Connect.
@@ -164,20 +159,6 @@ ca:
164159
# This field is mandatory if `ca_cert` is set.
165160
# keyAlg: RSA
166161

167-
containerLinux:
168-
# (optional) The Container Linux update channel.
169-
#
170-
# Examples: `stable`, `beta`, `alpha`
171-
# channel: stable
172-
173-
# The Container Linux version to use. Set to `latest` to select the latest available version for the selected update channel.
174-
#
175-
# Examples: `latest`, `1465.6.0`
176-
version: latest
177-
178-
# (optional) A list of PEM encoded CA files that will be installed in /etc/ssl/certs on etcd, master, and worker nodes.
179-
# customCAPEMList:
180-
181162
iscsi:
182163
# (optional) Start iscsid.service to enable iscsi volume attachment.
183164
# enabled: false

examples/tectonic.libvirt.yaml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,20 +32,6 @@ ca:
3232
# This field is mandatory if `ca_cert` is set.
3333
# keyAlg: RSA
3434

35-
containerLinux:
36-
# (optional) The Container Linux update channel.
37-
#
38-
# Examples: `stable`, `beta`, `alpha`
39-
channel: beta
40-
41-
# The Container Linux version to use. Set to `latest` to select the latest available version for the selected update channel.
42-
#
43-
# Examples: `latest`, `1465.6.0`
44-
version: latest
45-
46-
# (optional) A list of PEM encoded CA files that will be installed in /etc/ssl/certs on master and worker nodes.
47-
# customCAPEMList:
48-
4935
iscsi:
5036
# (optional) Start iscsid.service to enable iscsi volume attachment.
5137
# enabled: false

installer/pkg/config-generator/fixtures/kube-system.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ data:
4040
type: canal
4141
platform:
4242
aws:
43-
region: eu-west-1
43+
region: us-east-1
4444
vpcCIDRBlock: 10.0.0.0/16
4545
vpcID: ""
4646
pullSecret: '{"auths": {}}'

installer/pkg/config-generator/fixtures/test-aws.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,11 @@ worker:
1313
nodePools:
1414
- worker
1515
pullSecret: '{"auths": {}}'
16-
containerLinux:
17-
channel: stable
18-
version: latest
1916
admin:
2017
email: test@coreos.com
2118
password: asd123
2219
aws:
23-
region: eu-west-1
20+
region: us-east-1
2421
sshKey: tectonic
2522
vpcCIDRBlock: 10.0.0.0/16
2623
master:

installer/pkg/config-generator/generator_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
func initConfig(t *testing.T, file string) ConfigGenerator {
1515
cluster, err := config.ParseConfigFile("./fixtures/" + file)
1616
if err != nil {
17-
t.Errorf("Test case TestUrlFunctions: failed to parse test config, %s", err)
17+
t.Fatalf("Test case TestUrlFunctions: failed to parse test config, %s", err)
1818
}
1919

2020
return ConfigGenerator{

installer/pkg/config/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ go_library(
1414
"//installer/pkg/config/aws:go_default_library",
1515
"//installer/pkg/config/libvirt:go_default_library",
1616
"//installer/pkg/validate:go_default_library",
17+
"//pkg/rhcos:go_default_library",
1718
"//vendor/github.com/Sirupsen/logrus:go_default_library",
1819
"//vendor/github.com/coreos/ignition/config/v2_2:go_default_library",
1920
"//vendor/github.com/coreos/tectonic-config/config/tectonic-network:go_default_library",

installer/pkg/config/aws/aws.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const (
1515
// DefaultProfile is the default AWS credentials profile to use.
1616
DefaultProfile = "default"
1717
// DefaultRegion is the default AWS region for the cluster.
18-
DefaultRegion = "eu-west-1"
18+
DefaultRegion = "us-east-1"
1919
)
2020

2121
// AWS converts AWS related config.

installer/pkg/config/cluster.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ const (
2121
PlatformAWS Platform = "aws"
2222
// PlatformLibvirt is the platform for a cluster launched on libvirt.
2323
PlatformLibvirt Platform = "libvirt"
24+
// DefaultChannel is the default RHCOS channel for the cluster.
25+
DefaultChannel = "tested"
2426
)
2527

2628
// Platform indicates the target platform of the cluster.
@@ -54,10 +56,6 @@ var defaultCluster = Cluster{
5456
CA: CA{
5557
RootCAKeyAlg: "RSA",
5658
},
57-
ContainerLinux: ContainerLinux{
58-
Channel: ContainerLinuxChannelStable,
59-
Version: ContainerLinuxVersionLatest,
60-
},
6159
Libvirt: libvirt.Libvirt{
6260
Network: libvirt.Network{
6361
IfName: libvirt.DefaultIfName,
@@ -77,7 +75,6 @@ type Cluster struct {
7775
aws.AWS `json:",inline" yaml:"aws,omitempty"`
7876
BaseDomain string `json:"tectonic_base_domain,omitempty" yaml:"baseDomain,omitempty"`
7977
CA `json:",inline" yaml:"CA,omitempty"`
80-
ContainerLinux `json:",inline" yaml:"containerLinux,omitempty"`
8178
IgnitionMasters []string `json:"tectonic_ignition_masters,omitempty" yaml:"-"`
8279
IgnitionWorker string `json:"tectonic_ignition_worker,omitempty" yaml:"-"`
8380
Internal `json:",inline" yaml:"-"`

installer/pkg/config/parser.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@ package config
22

33
import (
44
"errors"
5+
"fmt"
56
"io/ioutil"
67

78
"gopkg.in/yaml.v2"
9+
10+
"github.com/openshift/installer/pkg/rhcos"
811
)
912

1013
// ParseConfig parses a yaml string and returns, if successful, a Cluster.
@@ -28,6 +31,14 @@ func ParseConfig(data []byte) (*Cluster, error) {
2831
cluster.PullSecret = string(data)
2932
}
3033

34+
if cluster.EC2AMIOverride == "" {
35+
ami, err := rhcos.AMI(DefaultChannel, cluster.AWS.Region)
36+
if err != nil {
37+
return nil, fmt.Errorf("Failed to determine default AMI: %v", err)
38+
}
39+
cluster.EC2AMIOverride = ami
40+
}
41+
3142
return &cluster, nil
3243
}
3344

0 commit comments

Comments
 (0)