Skip to content

Commit f6cf9a8

Browse files
authored
Merge pull request #94 from hyder/91-admin-host
major upgrade prompted by switch to kubeconfig v2
2 parents d76de1e + ab4f8f4 commit f6cf9a8

Some content is hidden

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

89 files changed

+1404
-592
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
*.tfvars
1010

1111
generated/**
12-
scripts/tesseract.sh
1312

1413
# visual code
1514
**/.vscode/*

CHANGELOG.adoc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ All notable changes to this project are documented in this file.
77

88
The format is based on {uri-changelog}[Keep a Changelog].
99

10+
== v2.0.0-beta.1
11+
* Added admin host for operations instead of using the bastion server #91
12+
* Installed Python3, oci-cli #91
13+
* Switched from kubeconfig v1 to v2, generated by oci-cli instead of uploading #91
14+
* Switched all operations from bastion to admin host #91
15+
* Use compartment id instead of compartment name for policies #86
16+
* Updated available list of Kubernetes versions in Terraform options #90
17+
1018
== v1.0.0 (September 27,2019)
1119

1220
=== Changes

docs/configuration.adoc

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
. link:#configure-oci-parameters[Configure OCI parameters]
5353
. link:#configure-oci-networking-parameters[Configure OCI Networking parameters]
5454
. link:#configure-bastion-host-parameters[Configure Bastion Host parameters]
55+
. link:#configure-admin-host-parameters[Configure Admin Host parameters]
5556
. link:#configure-oke-parameters[Configure OKE parameters]
5657
. link:#configure-oke-load-balancer-parameters[Configure OKE Load Balancer parameters]
5758
. link:#configure-ocir-parameters[Configure OCIR parameters]
@@ -143,9 +144,13 @@ If you need to change the default VCN's CIDR, note the following:
143144

144145
=== Configure bastion host parameters
145146

146-
The bastion host parameters concern whether you want to enable the bastion. 1 parameter to keep in mind here is the enable_instance_principal. Be aware that if this is enabled, it gives API access to the bastion host without authentication.
147+
The bastion host parameters concern whether you want to enable the bastion.
147148

148-
Read {uri-instructions}#enabling-instance_principal-on-the-bastion-host[more] about {uri-oci-instance-principal}[instance_principal].
149+
=== Configure admin host parameters
150+
151+
The admin host parameters concern whether you want to enable the bastion. 1 parameter to keep in mind here is the admin_instance_principal. Be aware that if this is enabled, it gives API access to the admin host without authentication.
152+
153+
Read {uri-instructions}#enabling-instance_principal-on-the-admin-host[more] about {uri-oci-instance-principal}[instance_principal].
149154

150155
{uri-terraform-options}#bastion-host[Reference]
151156

@@ -221,8 +226,9 @@ The Kubernetes Metrics Server parameter controls the installation of {uri-metric
221226
The KMS integration parameters control whether {uri-oci-kms}[OCI Key Management Service] will be used for encrypting Kubernetes secrets. Additionally, the bastion host must be enabled as well as instance_principal on the bastion.
222227

223228
----
224-
create_bastion = true
225-
enable_instance_principal = true
229+
bastion_enabled = true
230+
admin_enabled = true
231+
admin_instance_principal = true
226232
use_encryption = true
227233
existing_key_id = <existing_key_id>
228234
----

docs/images/bastion.png

-16.2 KB
Loading

docs/images/defaultmad.png

-16.3 KB
Loading

docs/images/defaultsad.png

-16.6 KB
Loading

docs/images/networking.png

-6.58 KB
Loading

docs/instructions.adoc

Lines changed: 46 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -101,18 +101,15 @@ Use the parameter *cluster_name* to change the name of the cluster as per your n
101101

102102
=== Adding the bastion host
103103

104-
If you want to use bastion host, set the parameter *create_bastion* to *true* in terraform.tfvars. Refer to {uri-terraform-options}#bastion-host[Bastion Host] for other available bastion related parameters.
104+
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.
105105

106-
==== package_update and package_upgrade
106+
==== bastion_package_upgrade
107107

108-
There are 2 additional parameters for the bastion:
108+
There is 1 additional parameter for the bastion:
109109

110-
* bastion_package_update
111110
* bastion_package_upgrade
112111

113-
_bastion_package_update_ will update the apt database *if* you choose Ubuntu as the Linux distribution for the bastion host.
114-
115-
_bastion_package_upgrade_ will upgrade the bastion compute instance on first boot. If you choose Ubuntu for bastion host and you set _bastion_package_upgrade_ to *true*, you should also set the _bastion_package_update_ to *true*.
112+
_bastion_package_upgrade_ will upgrade the bastion compute instance on first boot.
116113

117114
****
118115
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.
@@ -121,7 +118,7 @@ N.B. It is good and recommended practice to upgrade your bastion host to the lat
121118
=== Using the bastion host
122119

123120
****
124-
*Assumption: you have set the create_bastion parameter to true in terraform.tfvars*
121+
*Assumption: you have set the bastion_enabled parameter to true in terraform.tfvars*
125122
****
126123

127124
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:
@@ -136,21 +133,51 @@ A utility script is also generated that contains the command to ssh to the basti
136133
scripts/tesseract.sh
137134
----
138135

139-
==== Enabling instance_principal on the bastion host
136+
=== Adding the admin host
137+
138+
The admin host is used to minimize local dependencies such as oci-cli, kubectl and so on.
139+
140+
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+
142+
==== admin_package_upgrade
143+
144+
There is 1 additional parameter for the admin:
145+
146+
* admin_package_upgrade
147+
148+
_admin_package_upgrade_ will upgrade the admin compute packages on first boot.
149+
150+
****
151+
N.B. It is good and recommended practice to upgrade your package host to the latest packages to minimize the possibility of vulnerabilities. However, it will also take slightly longer before the package host is available.
152+
****
153+
154+
=== Using the admin host
155+
156+
****
157+
*Assumption: you have set the admin_enabled parameter to true in terraform.tfvars*
158+
****
159+
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:
161+
162+
----
163+
terraform output
164+
----
165+
166+
==== Enabling instance_principal on the admin host
140167
{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.
141168

142169
Any user who has access to the instance (who can SSH to the instance), automatically inherits the privileges granted to the instance. Before you enable this feature, ensure that you know who can access it, and that they should be authorized with the permissions you are granting to the instance.
143170

144-
By default, this feature is *_disabled_*. However, it is *_required_* at the time of cluster creation *_if_* you wish to enable link:#kms-integration[KMS Integration].
171+
By default, this feature is *_disabled_*. However, it is *_required_* at the time of cluster creation *_if_* you wish to enable link:#kms-integration[KMS Integration], calico, metricserver, helm or creating the OCIR secret.
145172

146-
When you enable this feature, by default, the bastion has privileges to all resources in the compartment. If you are enabling it for link:#kms-integration[KMS Integration], the bastion host will also have rights to create policies in the root tenancy.
173+
When you enable this feature, by default, the admin host will have privileges to all resources in the compartment. If you are enabling it for link:#kms-integration[KMS Integration], the admin host will also have rights to create policies in the root tenancy.
147174

148-
You can also turn on and off the feature at any time without impact on the bastion or the cluster.
175+
You can also turn on and off the feature at any time without impact on the admin or the cluster.
149176

150-
To enable, set enable_instance_principal to true:
177+
To enable, set admin_instance_principal to true:
151178

152179
----
153-
enable_instance_principal = "true"
180+
admin_instance_principal = "true"
154181
----
155182

156183
and verify:
@@ -159,13 +186,13 @@ and verify:
159186
oci network vcn list --compartment-id <compartment-id>
160187
----
161188

162-
==== Disabling instance_principal on the bastion host
189+
==== Disabling instance_principal on the admin host
163190

164-
. Set enable_instance_principal to false in terraform.tfvars
191+
. Set admin_instance_principal to false in terraform.tfvars
165192

166193
+
167194
----
168-
enable_instance_principal = false
195+
admin_instance_principal = false
169196
----
170197

171198
. Run terraform apply again:
@@ -177,8 +204,8 @@ terraform apply
177204

178205
==== Recommendations for using instance_principal
179206

180-
. Do not enable instance_principal if you are not using link:#kms-integration[KMS Integration]
181-
. Enable instance_principal *_if and only if_* you are using link:#kms-integration[KMS Integration]
207+
. Do not enable instance_principal if you are not using link:#kms-integration[KMS Integration] or calico
208+
. Enable instance_principal *_if and only if_* you are using link:#kms-integration[KMS Integration], calico, metricserver, helm or creating the OCIR secret.
182209
. Disable instance_principal once the cluster is created
183210

184211
=== Interacting with the OKE Cluster locally

docs/quickstart.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ cp terraform.tfvars.example terraform.tfvars
6464
* ssh_public_key_path
6565
* vcn_dns_label
6666
* vcn_name
67-
* create_bastion
67+
* bastion_enabled
6868
* cluster_name
6969
* worker_mode
7070

0 commit comments

Comments
 (0)