Skip to content

Commit e2aa7c5

Browse files
authored
Develop (#102)
* Modified docs Signed-off-by: niki-1905 <nikkikokitkar@gmail.com> * Remove jmeter submodule, literatebee key, and empty vendor folder. Signed-off-by: Arush Salil <me@aru.sh> * Update Dockerfile Signed-off-by: Arush Salil <me@aru.sh> * Update Readme Signed-off-by: Arush Salil <me@aru.sh> * Update AWS documentation Signed-off-by: Arush Salil <me@aru.sh> * Add lifecycle documentation. Signed-off-by: Arush Salil <me@aru.sh> * Fix typo Signed-off-by: Arush Salil <me@aru.sh> * Refactor and add tests Signed-off-by: Manuel Müller <mueller.m.h@gmail.com> * Update documentation * Update .gitignore * add pkg provisioner * Update Makefile * Release/0 5 1 (#74) * Update Documentation on master branch (#72) * Modified docs Signed-off-by: niki-1905 <nikkikokitkar@gmail.com> * Remove jmeter submodule, literatebee key, and empty vendor folder. Signed-off-by: Arush Salil <me@aru.sh> * Update Dockerfile Signed-off-by: Arush Salil <me@aru.sh> * Update Readme Signed-off-by: Arush Salil <me@aru.sh> * Update AWS documentation Signed-off-by: Arush Salil <me@aru.sh> * Add lifecycle documentation. Signed-off-by: Arush Salil <me@aru.sh> * Fix typo Signed-off-by: Arush Salil <me@aru.sh> * TK8-47 add infrastructure only flag https://kubernauts.atlassian.net/browse/TK8-47 * Bug/version (#75) * #67 | modify | remove not needed requirements Signed-off-by: Manuel Müller <mueller.m.h@gmail.com> * #66 | fix | Getting started link Signed-off-by: Manuel Müller <mueller.m.h@gmail.com> * #66 | modify | change path relative Signed-off-by: Manuel Müller <mueller.m.h@gmail.com> * Update Documentation on master branch (#72) * Modified docs Signed-off-by: niki-1905 <nikkikokitkar@gmail.com> * Remove jmeter submodule, literatebee key, and empty vendor folder. Signed-off-by: Arush Salil <me@aru.sh> * Update Dockerfile Signed-off-by: Arush Salil <me@aru.sh> * Update Readme Signed-off-by: Arush Salil <me@aru.sh> * Update AWS documentation Signed-off-by: Arush Salil <me@aru.sh> * Add lifecycle documentation. Signed-off-by: Arush Salil <me@aru.sh> * Fix typo Signed-off-by: Arush Salil <me@aru.sh> Signed-off-by: Manuel Müller <mueller.m.h@gmail.com> * Release/0 5 1 (#73) * Modified docs Signed-off-by: niki-1905 <nikkikokitkar@gmail.com> * Remove jmeter submodule, literatebee key, and empty vendor folder. Signed-off-by: Arush Salil <me@aru.sh> * Update Dockerfile Signed-off-by: Arush Salil <me@aru.sh> * Update Readme Signed-off-by: Arush Salil <me@aru.sh> * Update AWS documentation Signed-off-by: Arush Salil <me@aru.sh> * Add lifecycle documentation. Signed-off-by: Arush Salil <me@aru.sh> * Fix typo Signed-off-by: Arush Salil <me@aru.sh> * Refactor and add tests Signed-off-by: Manuel Müller <mueller.m.h@gmail.com> * Update documentation * Update .gitignore * add pkg provisioner * Update Makefile * TK8-47 add infrastructure only flag https://kubernauts.atlassian.net/browse/TK8-47 Signed-off-by: Manuel Müller <mueller.m.h@gmail.com> * BUG | Fix Version display The version is not display like accepted This will fix it Signed-off-by: Manuel Müller <mueller.m.h@gmail.com> * Add rke provisioner related variables Signed-off-by: Shantanu Deshpande <shantanud106@gmail.com> * RKE provisioner changes (#81) * Add documentation for using rke provisioner Signed-off-by: Shantanu Deshpande <shantanud106@gmail.com> * Add changes for rke provisioner configuration Signed-off-by: Shantanu Deshpande <shantanud106@gmail.com> * update the documentation add tk8 addon install rancher Signed-off-by: Manuel Müller <mueller.m.h@gmail.com> * move common stuff to the main pkg Signed-off-by: Manuel Müller <mueller.m.h@gmail.com> * Fix doc path rke Signed-off-by: Manuel Müller <mueller.m.h@gmail.com> * RKE region issue fix Signed-off-by: Shantanu Deshpande <shantanud106@gmail.com> * Fixing typo (#84) Signed-off-by: Imran Pochi <pochiimran@yahoo.co.in> * Bug/addon install bug (#87) * Release 0.6.0 (#83) * Modified docs Signed-off-by: niki-1905 <nikkikokitkar@gmail.com> * Remove jmeter submodule, literatebee key, and empty vendor folder. Signed-off-by: Arush Salil <me@aru.sh> * Update Dockerfile Signed-off-by: Arush Salil <me@aru.sh> * Update Readme Signed-off-by: Arush Salil <me@aru.sh> * Update AWS documentation Signed-off-by: Arush Salil <me@aru.sh> * Add lifecycle documentation. Signed-off-by: Arush Salil <me@aru.sh> * Fix typo Signed-off-by: Arush Salil <me@aru.sh> * Refactor and add tests Signed-off-by: Manuel Müller <mueller.m.h@gmail.com> * Update documentation * Update .gitignore * add pkg provisioner * Update Makefile * Release/0 5 1 (#74) * Update Documentation on master branch (#72) * Modified docs Signed-off-by: niki-1905 <nikkikokitkar@gmail.com> * Remove jmeter submodule, literatebee key, and empty vendor folder. Signed-off-by: Arush Salil <me@aru.sh> * Update Dockerfile Signed-off-by: Arush Salil <me@aru.sh> * Update Readme Signed-off-by: Arush Salil <me@aru.sh> * Update AWS documentation Signed-off-by: Arush Salil <me@aru.sh> * Add lifecycle documentation. Signed-off-by: Arush Salil <me@aru.sh> * Fix typo Signed-off-by: Arush Salil <me@aru.sh> * TK8-47 add infrastructure only flag https://kubernauts.atlassian.net/browse/TK8-47 * Bug/version (#75) * #67 | modify | remove not needed requirements Signed-off-by: Manuel Müller <mueller.m.h@gmail.com> * #66 | fix | Getting started link Signed-off-by: Manuel Müller <mueller.m.h@gmail.com> * #66 | modify | change path relative Signed-off-by: Manuel Müller <mueller.m.h@gmail.com> * Update Documentation on master branch (#72) * Modified docs Signed-off-by: niki-1905 <nikkikokitkar@gmail.com> * Remove jmeter submodule, literatebee key, and empty vendor folder. Signed-off-by: Arush Salil <me@aru.sh> * Update Dockerfile Signed-off-by: Arush Salil <me@aru.sh> * Update Readme Signed-off-by: Arush Salil <me@aru.sh> * Update AWS documentation Signed-off-by: Arush Salil <me@aru.sh> * Add lifecycle documentation. Signed-off-by: Arush Salil <me@aru.sh> * Fix typo Signed-off-by: Arush Salil <me@aru.sh> Signed-off-by: Manuel Müller <mueller.m.h@gmail.com> * Release/0 5 1 (#73) * Modified docs Signed-off-by: niki-1905 <nikkikokitkar@gmail.com> * Remove jmeter submodule, literatebee key, and empty vendor folder. Signed-off-by: Arush Salil <me@aru.sh> * Update Dockerfile Signed-off-by: Arush Salil <me@aru.sh> * Update Readme Signed-off-by: Arush Salil <me@aru.sh> * Update AWS documentation Signed-off-by: Arush Salil <me@aru.sh> * Add lifecycle documentation. Signed-off-by: Arush Salil <me@aru.sh> * Fix typo Signed-off-by: Arush Salil <me@aru.sh> * Refactor and add tests Signed-off-by: Manuel Müller <mueller.m.h@gmail.com> * Update documentation * Update .gitignore * add pkg provisioner * Update Makefile * TK8-47 add infrastructure only flag https://kubernauts.atlassian.net/browse/TK8-47 Signed-off-by: Manuel Müller <mueller.m.h@gmail.com> * BUG | Fix Version display The version is not display like accepted This will fix it Signed-off-by: Manuel Müller <mueller.m.h@gmail.com> * Add rke provisioner related variables Signed-off-by: Shantanu Deshpande <shantanud106@gmail.com> * RKE provisioner changes (#81) * Add documentation for using rke provisioner Signed-off-by: Shantanu Deshpande <shantanud106@gmail.com> * Add changes for rke provisioner configuration Signed-off-by: Shantanu Deshpande <shantanud106@gmail.com> * update the documentation add tk8 addon install rancher Signed-off-by: Manuel Müller <mueller.m.h@gmail.com> * move common stuff to the main pkg Signed-off-by: Manuel Müller <mueller.m.h@gmail.com> * Fix doc path rke Signed-off-by: Manuel Müller <mueller.m.h@gmail.com> * RKE region issue fix Signed-off-by: Shantanu Deshpande <shantanud106@gmail.com> * add signed #86 | BUG | Addon | fx addon bug Signed-off-by: Manuel Müller <mueller.m.h@gmail.com> * Tweaking addon addition/removal functionality (#89) * Adding functionality for addons where different main.sh is required for removal and installation. example: helm where installation and removal of tiller componenet happens with hte helm of helm init and helm reset and not yaml files Signed-off-by: Imran Pochi <pochiimran@yahoo.co.in> * Cleanup - removing unnecessary print statements Signed-off-by: Imran Pochi <pochiimran@yahoo.co.in> * WIP: Terraform Provider Rancher2 integration (#101) * Terraform Provider Rancher2 integration Signed-off-by: ishantanu <shantanud106@gmail.com> * Add disk size option Signed-off-by: Shantanu Deshpande <shantanud106@gmail.com> * Add distro vars in template Signed-off-by: Shantanu Deshpande <shantanud106@gmail.com>
1 parent 9a9bbf3 commit e2aa7c5

File tree

6 files changed

+253
-7
lines changed

6 files changed

+253
-7
lines changed

cmd/cli/provisioner.go

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import (
2222
aws "github.com/kubernauts/tk8-provisioner-aws"
2323
azure "github.com/kubernauts/tk8-provisioner-azure"
2424
baremetal "github.com/kubernauts/tk8-provisioner-baremetal"
25+
cattleaws "github.com/kubernauts/tk8-provisioner-cattle-aws"
2526
eks "github.com/kubernauts/tk8-provisioner-eks"
2627
nutanix "github.com/kubernauts/tk8-provisioner-nutanix"
2728
openstack "github.com/kubernauts/tk8-provisioner-openstack"
@@ -34,13 +35,14 @@ import (
3435

3536
var name string
3637
var provisioners = map[string]provisioner.Provisioner{
37-
"aws": aws.NewAWS(),
38-
"azure": azure.NewAzure(),
39-
"baremetal": baremetal.NewBaremetal(),
40-
"eks": eks.NewEKS(),
41-
"nutanix": nutanix.NewNutanix(),
42-
"openstack": openstack.NewOpenstack(),
43-
"rke": rke.NewRKE(),
38+
"aws": aws.NewAWS(),
39+
"azure": azure.NewAzure(),
40+
"baremetal": baremetal.NewBaremetal(),
41+
"cattle-aws": cattleaws.NewCattleAWS(),
42+
"eks": eks.NewEKS(),
43+
"nutanix": nutanix.NewNutanix(),
44+
"openstack": openstack.NewOpenstack(),
45+
"rke": rke.NewRKE(),
4446
}
4547

4648
var provisionerInstallCmd = &cobra.Command{

config-cattle-aws-existing-vpc.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
cattle-aws:
2+
root_disk_size: 20
3+
iam_instance_profile_name: "rancher-controlplane-role"
4+
iam_instance_profile_worker: # specify if overlap_cp_etcd_worker is false and existing_vpc is true
5+
rancher_cluster_name: "cattle-aws-cluster"
6+
rancher_api_url: "https://rancher.xyz.com/v3"
7+
rancher_access_key:
8+
rancher_secret_key:
9+
rke_network_plugin: "canal"
10+
region: "eu-central-1"
11+
existing_vpc: "true"
12+
vpc_id: "vpc-1abcdgggga72a691a"
13+
subnet_id: "subnet-1f98d368767ge1e71"
14+
security_group_name: "rancher-nodes"
15+
os: "ubuntu"
16+
instance_type: "t2.medium"
17+
aws_secret_access_key:
18+
aws_default_region: "eu-central-1"
19+
overlap_cp_etcd_worker: "true"
20+
overlap_node_pool:
21+
hostname_prefix: "cattle-aws-cluster"
22+
quantity: 1
23+
master_node_pool:
24+
hostname_prefix:
25+
quantity:
26+
worker_node_pool:
27+
hostname_prefix:
28+
quantity:
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
cattle-aws:
2+
root_disk_size: 20
3+
iam_instance_profile_name:
4+
rancher_cluster_name: "cattle-aws-cluster"
5+
rancher_api_url: "https://rancher.xyz.com/v3"
6+
rancher_access_key:
7+
rancher_secret_key:
8+
rke_network_plugin: "canal"
9+
region: "eu-central-1"
10+
existing_vpc: "false"
11+
vpc_id:
12+
subnet_id:
13+
security_group_name:
14+
os: "ubuntu"
15+
instance_type: "t2.medium"
16+
aws_secret_access_key:
17+
aws_default_region: "eu-central-1"
18+
overlap_cp_etcd_worker: "false"
19+
overlap_node_pool:
20+
hostname_prefix:
21+
quantity:
22+
master_node_pool:
23+
hostname_prefix: "cattle-aws-master"
24+
quantity: 1
25+
worker_node_pool:
26+
hostname_prefix: "cattle-aws-worker"
27+
quantity: 1

config-cattle-aws-novpc-overlap.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
cattle-aws:
2+
root_disk_size: 20
3+
iam_instance_profile_name:
4+
rancher_cluster_name: "cattle-aws-cluster"
5+
rancher_api_url: "https://rancher.xyz.com/v3"
6+
rancher_access_key:
7+
rancher_secret_key:
8+
rke_network_plugin: "canal"
9+
region: "eu-central-1"
10+
existing_vpc: "false"
11+
vpc_id:
12+
subnet_id:
13+
security_group_name:
14+
os: "ubuntu"
15+
instance_type: "t2.medium"
16+
aws_secret_access_key:
17+
aws_default_region: "eu-central-1"
18+
overlap_cp_etcd_worker: "true"
19+
overlap_node_pool:
20+
hostname_prefix: "cattle-aws-cluster"
21+
quantity: 1
22+
master_node_pool:
23+
hostname_prefix:
24+
quantity:
25+
worker_node_pool:
26+
hostname_prefix:
27+
quantity:

pkg/templates/distos.go

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,24 @@ variable "ssh_user" {
2121
default = "{{.User}}"
2222
}
2323
`
24+
var DistVariablesCattleAWS = `
25+
data "aws_ami" "distro" {
26+
most_recent = true
27+
28+
filter {
29+
name = "name"
30+
values = ["{{.NodeOS}}"]
31+
}
32+
33+
filter {
34+
name = "virtualization-type"
35+
values = ["hvm"]
36+
}
37+
38+
owners = ["{{.AmiOwner}}"]
39+
}
40+
41+
variable "ssh_user" {
42+
default = "{{.User}}"
43+
}
44+
`

pkg/templates/variables.go

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,3 +232,144 @@ variable "default_tags" {
232232
type = "map"
233233
}
234234
`
235+
var VariablesCattleAWS = `
236+
variable "root_disk_size" {
237+
default = "{{.RootDiskSize}}"
238+
description = "Root disk size for instances in GB"
239+
type = "string"
240+
}
241+
242+
variable "iam_instance_profile_name_worker" {
243+
default = "{{.IAMInstanceProfileWorker}}"
244+
description = "IAM instance profile name for worker"
245+
type = "string"
246+
}
247+
248+
variable "iam_instance_profile_name" {
249+
default = "{{.IAMInstanceProfile}}"
250+
description = "IAM instance profile name"
251+
type = "string"
252+
}
253+
254+
variable "rancher_api_url" {
255+
default = "{{.RancherAPIURL}}"
256+
description = "Rancher API URL"
257+
type = "string"
258+
}
259+
260+
variable "rancher_access_key" {
261+
description = "Rancher server's access key"
262+
}
263+
264+
variable "rancher_secret_key" {
265+
description = "Rancher server's secret key"
266+
}
267+
268+
variable "rancher_cluster_name" {
269+
default = "{{.RancherClusterName}}"
270+
description = "Rancher cluster name"
271+
type = "string"
272+
}
273+
274+
variable "rke_network_plugin" {
275+
default = "{{.RKENetworkPlugin}}"
276+
description = "Network plugin for cluster"
277+
type = "string"
278+
}
279+
280+
variable "region" {
281+
default = "{{.Region}}"
282+
description = "AWS region"
283+
type = "string"
284+
}
285+
286+
variable "existing_vpc" {
287+
default = {{.ExistingVPC}}
288+
description = "Use existing VPC for creating clusters"
289+
type = "string"
290+
}
291+
292+
variable "vpc_id" {
293+
default = "{{.VPCID}}"
294+
description = "VPC ID"
295+
type = "string"
296+
}
297+
298+
variable "subnet_id" {
299+
default = "{{.SubnetID}}"
300+
description = "subnet id"
301+
type = "string"
302+
}
303+
304+
variable "security_group_name" {
305+
default = "{{.SecurityGroupName}}"
306+
description = "security group id"
307+
type = "string"
308+
}
309+
310+
variable "os" {
311+
default = "{{.OS}}"
312+
description = "ami id - frankfurt"
313+
type = "string"
314+
}
315+
316+
variable "instance_type" {
317+
default = "{{.InstanceType}}"
318+
description = "Instance type"
319+
type = "string"
320+
}
321+
322+
variable "overlap_cp_etcd_worker" {
323+
default = {{.OverlapCpEtcdWorker}}
324+
description = "Overlapping planes for node template"
325+
type = "string"
326+
}
327+
328+
variable "overlap_node_pool_hostname_prefix" {
329+
default = "{{.OverlapHostnamePrefix}}"
330+
description = "Hostname prefix for overlapped node pools"
331+
type = "string"
332+
}
333+
334+
variable "no_overlap_nodepool_master_hostname_prefix" {
335+
default = "{{.MasterHostnamePrefix}}"
336+
description = "Hostname prefix for master node pool"
337+
type = "string"
338+
}
339+
340+
variable "no_overlap_nodepool_worker_hostname_prefix" {
341+
default = "{{.WorkerHostnamePrefix}}"
342+
description = "Hostname prefix for worker node pool"
343+
type = "string"
344+
}
345+
346+
variable "no_overlap_nodepool_master_quantity" {
347+
default = "{{.MasterQuantity}}"
348+
description = "Node pool master quantity for non-overlapped planes"
349+
type = "string"
350+
}
351+
352+
variable "no_overlap_nodepool_worker_quantity" {
353+
default = "{{.WorkerQuantity}}"
354+
description = "Node pool worker quantity for non-overlapped planes"
355+
type = "string"
356+
}
357+
358+
variable "overlap_node_pool_quantity" {
359+
default = "{{.OverlapQuantity}}"
360+
description = "Node pool quantity for overlap planes"
361+
type = "string"
362+
}
363+
364+
variable "AWS_ACCESS_KEY_ID" {
365+
description = "AWS access key"
366+
}
367+
368+
variable "AWS_SECRET_ACCESS_KEY" {
369+
description = "AWS secret key"
370+
}
371+
372+
variable "AWS_DEFAULT_REGION" {
373+
description = "AWS default region"
374+
}
375+
`

0 commit comments

Comments
 (0)