文章目录
  1. 1. 提前准备
  2. 2. 开搞
    1. 2.1. CoreOS账号准备
    2. 2.2. DigitalOcean 操作
    3. 2.3. 下载并解压 Tectonic Installer
    4. 2.4. 配置terraform.tfvars配置文件

提前准备

开搞

CoreOS账号准备

  • 申请获取Tectonic License 和 Pull Secret
    将申请好的Tectonic License 和 Pull Secret保存好,以备后用

DigitalOcean 操作

  • 生成 Personal access token
    API -> Tokens/Keys
    注意,Scope 需要勾选Write选项

  • 生成 Space access keys
    API -> Tokens/Keys
    生成的过程中会开通Spaces服务

  • 添加DNS zone
    Networking -> Domains
    添加一个base DNS domain

下载并解压 Tectonic Installer

具体安装步骤参见官方网站链接链接地址

  • 这里注意将所有命令中aws替换为digitalocean就可以,另外注意选择正确的“platform”。
  • AWS_ACCESS_KEY_ID、AWS_SECRET_ACCESS_KEY、AWS_REGION 这三个环境变量无需设置

配置terraform.tfvars配置文件

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
// Your Tectonic cluster administration email address
tectonic_admin_email = "example@example.com"

// Your desired Tectonic cluster administration password
tectonic_admin_password = "examplepassword"

// Your API token for DigitalOcean
tectonic_do_token = "DIGITALOCEAN API TOKEN"

// Access key ID and secret access key for DigitalOcean Spaces.
// The Tectonic Installer uses a Spaces bucket to store Tectonic assets and kubeconfig.
tectonic_do_spaces_access_key_id = "ACCESS KEY ID"
tectonic_do_spaces_secret_access_key = "SECRET ACCESS KEY"

// Instance size for the etcd node(s). Read the [etcd recommended hardware](https://coreos.com/etcd/docs/latest/op-guide/hardware.html) guide for best performance
tectonic_do_etcd_droplet_size = "1gb"

// (optional) Instance size for the master node(s).
tectonic_do_master_droplet_size = "1gb"

// (optional) Instance size for the worker node(s).
tectonic_do_worker_droplet_size = "1gb"

// A list of DigitalOcean SSH IDs to enable in the created droplets.
// example to get the SSH keyids
// curl -X GET -H 'Content-Type: application/json' -H 'Authorization: Bearer <TOKEN>' "https://api.digitalocean.com/v2/account/keys"
tectonic_do_ssh_keys = [1, 2]

// (optional) The region to create your droplets in.
tectonic_do_droplet_region = "sgp1"

// 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.
// Instructions for configuring delegated domains for Azure DNS can be found here: https://docs.microsoft.com/en-us/azure/dns/dns-delegate-domain-azure-dns
tectonic_base_domain = "TECTONIC BASE DOMAIN"

// (optional) The content of the PEM-encoded CA certificate, used to generate Tectonic Console's server certificate.
// If left blank, a CA certificate will be automatically generated.
// tectonic_ca_cert = ""

// (optional) The content of the PEM-encoded CA key, used to generate Tectonic Console's server certificate.
// This field is mandatory if `tectonic_ca_cert` is set.
// tectonic_ca_key = ""

// (optional) The algorithm used to generate tectonic_ca_key.
// The default value is currently recommended.
// This field is mandatory if `tectonic_ca_cert` is set.
// tectonic_ca_key_alg = "RSA"

// (optional) This declares the IP range to assign Kubernetes pod IPs in CIDR notation.
// tectonic_cluster_cidr = "10.2.0.0/16"

// 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.
tectonic_cluster_name = "demo"

// (optional) The Container Linux update channel.
//
// Examples: `stable`, `beta`, `alpha`
// tectonic_container_linux_channel = "stable"

// 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`
tectonic_container_linux_version = "latest"

// (optional) A list of PEM encoded CA files that will be installed in /etc/ssl/certs on etcd, master, and worker nodes.
// tectonic_custom_ca_pem_list = ""

// (optional) This only applies if you use the modules/dns/ddns module.
//
// Specifies the RFC2136 Dynamic DNS server key algorithm.
// tectonic_ddns_key_algorithm = ""

// (optional) This only applies if you use the modules/dns/ddns module.
//
// Specifies the RFC2136 Dynamic DNS server key name.
// tectonic_ddns_key_name = ""

// (optional) This only applies if you use the modules/dns/ddns module.
//
// Specifies the RFC2136 Dynamic DNS server key secret.
// tectonic_ddns_key_secret = ""

// (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.
// tectonic_ddns_server = ""

// (optional) DNS prefix used to construct the console and API server endpoints.
// tectonic_dns_name = ""

// (optional) The size in MB of the PersistentVolume used for handling etcd backups.
// tectonic_etcd_backup_size = "512"

// (optional) The name of an existing Kubernetes StorageClass that will be used for handling etcd backups.
// tectonic_etcd_backup_storage_class = ""

// (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.
// tectonic_etcd_ca_cert_path = "/dev/null"

// (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.
// tectonic_etcd_client_cert_path = "/dev/null"

// (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.
// tectonic_etcd_client_key_path = "/dev/null"

// 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.
tectonic_etcd_count = "0"

// (optional) List of external etcd v3 servers to connect with (hostnames/IPs only).
// 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"]`
// tectonic_etcd_servers = ""

// (optional) If set to `true`, all etcd endpoints will be configured to use the "https" scheme.
//
// Note: If `tectonic_experimental` is set to `true` this variable has no effect, because the experimental self-hosted etcd always uses TLS.
// tectonic_etcd_tls_enabled = true

// 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
tectonic_license_path = "ABSLUTE PATH"

// The number of master nodes to be created.
// This applies only to cloud platforms.
tectonic_master_count = "1"

// (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": [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.
// tectonic_networking = "flannel"

// 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
tectonic_pull_secret_path = "/home/core/tectonic-config/tectonic-pull-secret.conf"

// (optional) This declares the IP range to assign Kubernetes service cluster IPs in CIDR notation.
// The maximum size of this IP range is /12
// tectonic_service_cidr = "10.3.0.0/16"

// Validity period of the self-signed certificates (in hours).
// Default is 3 years.
// This setting is ignored if user provided certificates are used.
tectonic_tls_validity_period = "26280"

// The number of worker nodes to be created.
// This applies only to cloud platforms.
tectonic_worker_count = "3"

需要处理的配置:
tectonic_admin_email
tectonic_admin_password
tectonic_do_token
tectonic_do_spaces_access_key_id
tectonic_do_spaces_secret_access_key
tectonic_do_ssh_keys
tectonic_base_domain
tectonic_cluster_name
tectonic_license_path
tectonic_pull_secret_path

文章目录
  1. 1. 提前准备
  2. 2. 开搞
    1. 2.1. CoreOS账号准备
    2. 2.2. DigitalOcean 操作
    3. 2.3. 下载并解压 Tectonic Installer
    4. 2.4. 配置terraform.tfvars配置文件