You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
updated base module to use Autonomous platform image instead of marke… (#118)
* updated base module to use Autonomous platform image instead of marketplace. Also disabled kubernetes dashboard by default (#116)
Signed-off-by: Ali Mukadam <[email protected]>
* updated instructions
Signed-off-by: Ali Mukadam <[email protected]>
* base module pointing directly to terraform-oci-base, local copy removed, kubernetes dashboard disabled by default, changelog updated
Signed-off-by: Ali Mukadam <[email protected]>
* minor doc correction
Signed-off-by: Ali Mukadam <[email protected]>
. link:#scaling-the-number-of-worker-nodes[Scaling the number of worker nodes]
60
62
. link:#scaling-the-number-of-node-pools[Scaling the number of node pools]
61
63
. link:#accessing-the-kubernetes-dashboard[Accessing the Kubernetes dashboard]
62
64
. link:#destroying-the-cluster[Destroying the cluster]
65
+
. link:#creating-a-service-account-for-cicd-tools[Creating a service account for CI/CD tools]
63
66
64
67
=== Assumptions
65
68
@@ -103,43 +106,28 @@ Use the parameter *cluster_name* to change the name of the cluster as per your n
103
106
104
107
If you want to use bastion host, set the parameter *bastion_enabled* to *true* in terraform.tfvars. Refer to {uri-terraform-options}#bastion-host[Bastion Host] for other available bastion related parameters.
105
108
106
-
==== bastion_package_upgrade
107
-
108
-
There is 1 additional parameter for the bastion:
109
-
110
-
* bastion_package_upgrade
111
-
112
-
_bastion_package_upgrade_ will upgrade the bastion compute instance on first boot.
113
-
114
-
****
115
-
N.B. It is good and recommended practice to upgrade your bastion host to the latest packages to minimize the possibility of vulnerabilities. However, it will also take slightly longer before the bastion host is available.
116
-
****
117
109
118
110
=== Using the bastion host
119
111
120
112
****
121
113
*Assumption: you have set the bastion_enabled parameter to true in terraform.tfvars*
122
114
****
123
115
124
-
Once the terraform apply is successful you will get the bastion_public_ip as output and also a ssh command .You can also run the below command to get the output:
116
+
Once the terraform apply is successful you will get the bastion_public_ip as output and also a ssh command. You can also run the below command to get the output:
125
117
126
118
----
127
119
terraform output
128
120
----
129
121
130
-
A utility script is also generated that contains the command to ssh to the bastion. You can run it directly:
131
-
132
-
----
133
-
scripts/tesseract.sh
134
-
----
122
+
You can then copy the ssh_to_bastion command, paste and run it in a terminal.
135
123
136
124
=== Adding the admin host
137
125
138
126
The admin host is used to minimize local dependencies such as oci-cli, kubectl and so on.
139
127
140
128
If you want to use the admin host, set the parameter *admin_enabled* to *true* in terraform.tfvars. Refer to {uri-terraform-options}#admin-host[Admin Host] for other available bastion related parameters.
141
129
142
-
==== admin_package_upgrade
130
+
==== Upgrading the admin host
143
131
144
132
There is 1 additional parameter for the admin:
145
133
@@ -157,12 +145,14 @@ N.B. It is good and recommended practice to upgrade your package host to the lat
157
145
*Assumption: you have set the admin_enabled parameter to true in terraform.tfvars*
158
146
****
159
147
160
-
Once the terraform apply is successful you will get the admin_private_ip as output and also a ssh command .You can also run the below command to get the output:
148
+
Once the terraform apply is successful you will get the admin_private_ip as output and also a ssh command. You can also run the below command to get the output:
161
149
162
150
----
163
151
terraform output
164
152
----
165
153
154
+
You can then copy the ssh_to_admin command, paste and run it in a terminal.
155
+
166
156
==== Enabling instance_principal on the admin host
167
157
{uri-oci-instance-principal}[instance_principal] is an IAM service feature that enables instances to be authorized actors (or principals) to perform actions on service resources. Each compute instance has its own identity, and it authenticates using the certificates that are added to it. These certificates are automatically created, assigned to instances and rotated, preventing the need for you to distribute credentials to your hosts and rotate them.
168
158
@@ -208,9 +198,15 @@ terraform apply
208
198
. Enable instance_principal *_if and only if_* you are using link:#kms-integration[KMS Integration], calico, metricserver, helm or creating the OCIR secret.
209
199
. Disable instance_principal once the cluster is created
210
200
211
-
=== Interacting with the OKE Cluster locally
201
+
=== Interacting with the OKE Cluster
202
+
203
+
kubectl installed on the admin host by default and the kubeconfig file is set in the default location (~/.kube/config) so you don't need to set the KUBECONFIG environment variable every time you log in to the admin host.
204
+
205
+
****
206
+
N.B. In order for kubeconfig to be created on the admin host, you need to link:#enabling-instance_principal-on-the-admin-host[enable instance_principal on the admin host].
207
+
****
212
208
213
-
kubectl installed in bastion host by default and the kubeconfig file is set in the default location (~/.kube/config) so you don't need to set the KUBECONFIG environment variable every time you log in to the bastion. An alias "*k*" will be created for kubectl on the bastion host.
209
+
An alias "*k*" will be created for kubectl on the admin host.
214
210
215
211
If you would like to use kubectl locally, {uri-install-kubectl}[install kubectl]. Then, set the KUBECONFIG to the config file path. The kubeconfig file will be saved generated locally under the folder *generated*:
{uri-helm}[Helm] is a package manager for kubernetes.If you want to install helm, set the parameter *install_helm = true* in terraform.tfvars. By default, it is set to true. An alias "*h*" will be created for helm on the bastion host. For other available parameters, refer to {uri-terraform-options}#helm[Helm parameters].
227
+
{uri-helm}[Helm] is a package manager for kubernetes. If you want to install helm on the admin host, set the parameter *install_helm = true* in terraform.tfvars. By default, it is set to false.
228
+
229
+
An alias "*h*" will be created for helm on the admin host. For other available parameters, refer to {uri-terraform-options}#helm[Helm parameters].
232
230
233
231
=== Installing Calico
234
232
235
-
Calico enables network policy in Kubernetes clusters across the cloud. To install calico set the parameter *install_calico = true* in terraform.tfvars. By default its set to false. Refer to {uri-terraform-options}#calico[Calico parameters] for other available parameters.
233
+
Calico enables network policy in Kubernetes clusters. To install calico set the parameter *install_calico = true* in terraform.tfvars. By default its set to false. Refer to {uri-terraform-options}#calico[Calico parameters] for other available parameters.
236
234
237
235
=== Installing Kubernetes Metrics Server
238
236
@@ -249,6 +247,8 @@ Set the parameter *node_pools* to the desired quantities to scale the node pools
249
247
250
248
=== Accessing the Kubernetes dashboard
251
249
250
+
By default, the Kubernetes dashboard is now disabled. To enable it, set the *dashboard_enabled = true* _before_ creating the cluster. The dashboard will then be deployed.
251
+
252
252
In a terminal window, run the command:
253
253
254
254
----
@@ -267,4 +267,21 @@ terraform destroy
267
267
268
268
****
269
269
*Only infrastructure created by terraform will get destroyed.*
270
-
****
270
+
****
271
+
272
+
273
+
=== Creating a service account for CI/CD tools
274
+
275
+
OKE now uses Kubeconfig v2 which means the default token has a limited lifespan. In order to allow CI/CD tools to deploy to OKE, a service account must be created.
276
+
277
+
Set the *create_service_account = true* and you can name the other parameters as appropriate:
Copy file name to clipboardExpand all lines: docs/terraformoptions.adoc
+5-15Lines changed: 5 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -222,8 +222,8 @@ newbits = {
222
222
223
223
|bastion_image_id
224
224
|Custom image id for the bastion host
225
-
|image_id or NONE. If the value is set to NONE, an Oracle Platform image will be used instead. Set use_autonomous to _false_ if you want to use your own image.
226
-
|NONE
225
+
|image_id or Autonomous. If the value is set to 'Autonomous', an Oracle Autonomous Linux Platform image will be used instead. If you want to use a custom image, set the image id instead.
226
+
|Autonomous
227
227
228
228
|bastion_notification_enabled
229
229
|Whether to enable ONS notification for the bastion host.
@@ -260,11 +260,6 @@ newbits = {
260
260
|
261
261
|Australia/Sydney
262
262
263
-
|bastion_use_autonomous
264
-
|Whether to use Autonomous Linux or an Oracle Linux Platform image or custom image. Set to false if you want to use your own image id or Oracle Linux Platform image.
265
-
|true/false
266
-
|true
267
-
268
263
|===
269
264
270
265
== Admin Host
@@ -283,8 +278,8 @@ newbits = {
283
278
284
279
|admin_image_id
285
280
|Custom image id for the admin host
286
-
|image_id or NONE. If the value is set to NONE, an Oracle Platform image will be used instead. Set use_autonomous to _false_ if you want to use your own image. For now, *do not use Autonomous for the admin host.*
287
-
|NONE
281
+
|image_id or Oracle. If the value is set to Oracle, an Oracle Platform image will be used instead.
282
+
|Oracle
288
283
289
284
|admin_instance_principal
290
285
|Whether to enable instance_principal on the admin server. Refer to {uri-docs}/instructions.adoc/#enabling-instance_principal-on-the-admin-host[instance_principal]
@@ -326,11 +321,6 @@ newbits = {
326
321
|
327
322
|Australia/Sydney
328
323
329
-
|admin_use_autonomous
330
-
|Whether to use Autonomous Linux or an Oracle Linux Platform image or custom image. Set to false if you want to use your own image id or Oracle Linux Platform image. *Do not use autonomous for now*
331
-
|true/false
332
-
|false
333
-
334
324
|===
335
325
336
326
== Availability Domain
@@ -389,7 +379,7 @@ availability_domains = {
389
379
|dashboard_enabled
390
380
|Whether to create the default Kubernetes dashboard.
391
381
|true/false
392
-
|true
382
+
|false
393
383
394
384
|kubernetes_version
395
385
|The version of Kubernetes to provision. This is based on the available versions in OKE. By default, the available versions will be queries and the latest version selected. To provision a specific version, choose from available versions and override the 'LATEST' value.
0 commit comments