-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add postinstall and presinstall scripts on the node configuration
- Loading branch information
Valentin
authored and
Valentin
committed
Nov 18, 2020
1 parent
00bd2a0
commit 9b1acf5
Showing
8 changed files
with
79 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
module "cce2_cluster" { | ||
source = "FlexibleEngineCloud/cce/flexibleengine" | ||
version = "2.2.0" | ||
|
||
cluster_name = "cluster-test" | ||
cluster_desc = " Cluster for testing purpose" | ||
availability_zone = "eu-west-0a" | ||
|
||
cluster_flavor = "cce.s1.small" | ||
vpc_id = "<VPC_ID>" | ||
network_id = "<NETWORK_ID>" //Caution here, you have to use NETWORK_ID even if argument is "subnet_id". Will be fixed soon | ||
cluster_version = "v1.15.6-r1" | ||
|
||
node_os = "CentOS 7.5" // Can be "EulerOS 2.5" or "CentOS 7.5" | ||
key_pair = "<SSH_KEY_NAME>" | ||
|
||
nodes_list = [ | ||
{ | ||
node_name = "new-node1" | ||
node_flavor = "s3.large.2" | ||
availability_zone = "eu-west-0a" | ||
root_volume_type = "SATA" | ||
root_volume_size = 40 | ||
data_volume_type = "SATA" | ||
data_volume_size = 100 | ||
node_labels = null # this paramters si to be set empty for an existing node | ||
vm_tags = null # this parameters can added to an existing node | ||
postinstall_script = data.template_file.test.rendered | ||
preinstall_script = null | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
provider "flexibleengine" { | ||
auth_url = "https://iam.eu-west-0.prod-cloud-ocb.orange-business.com/v3" | ||
region = "eu-west-0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
|
||
# Script executed on the postinstall step of the node | ||
|
||
echo "File content" > /root/my_file_content |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
data "template_file" "test" { | ||
template = file("test.sh") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
terraform { | ||
required_providers { | ||
flexibleengine = { | ||
source = "FlexibleEngineCloud/flexibleengine" | ||
} | ||
} | ||
required_version = ">= 0.13" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters