Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
notebooks-operations
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
702
Projekty
notebooks-operations
Commits
1fda0ec3
Commit
1fda0ec3
authored
1 year ago
by
František Dvořák
Browse files
Options
Downloads
Patches
Plain Diff
Site name prefix for internal hostnames in terraform
parent
8b798560
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
cesnet-mcc/terraform/terraform.tfvars
+1
-0
1 addition, 0 deletions
cesnet-mcc/terraform/terraform.tfvars
cesnet-mcc/terraform/vars.tf
+5
-0
5 additions, 0 deletions
cesnet-mcc/terraform/vars.tf
cesnet-mcc/terraform/vms.tf
+4
-4
4 additions, 4 deletions
cesnet-mcc/terraform/vms.tf
with
10 additions
and
4 deletions
cesnet-mcc/terraform/terraform.tfvars
+
1
−
0
View file @
1fda0ec3
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
ip_pool = "public-muni-147-251-124-GROUP"
ip_pool = "public-muni-147-251-124-GROUP"
net_name = "group-project-network"
net_name = "group-project-network"
net6_name = "public-muni-v6-432"
net6_name = "public-muni-v6-432"
site_name = "cesnet-mcc"
# These may need some adjustment for your provider
# These may need some adjustment for your provider
master_cpus = 2 # 2 CPUs to match existing flavours
master_cpus = 2 # 2 CPUs to match existing flavours
...
...
This diff is collapsed.
Click to expand it.
cesnet-mcc/terraform/vars.tf
+
5
−
0
View file @
1fda0ec3
...
@@ -13,6 +13,11 @@ variable "net6_name" {
...
@@ -13,6 +13,11 @@ variable "net6_name" {
description
=
"The name of the IPv6 network"
description
=
"The name of the IPv6 network"
}
}
variable
"site_name"
{
type
=
string
description
=
"Site identifier for internal host names"
}
variable
"master_cpus"
{
variable
"master_cpus"
{
type
=
number
type
=
number
description
=
"Number of CPUs for the master"
description
=
"Number of CPUs for the master"
...
...
This diff is collapsed.
Click to expand it.
cesnet-mcc/terraform/vms.tf
+
4
−
4
View file @
1fda0ec3
...
@@ -100,7 +100,7 @@ data "openstack_compute_flavor_v2" "worker-flavor" {
...
@@ -100,7 +100,7 @@ data "openstack_compute_flavor_v2" "worker-flavor" {
}
}
resource
"openstack_compute_instance_v2"
"master"
{
resource
"openstack_compute_instance_v2"
"master"
{
name
=
"k8s-master"
name
=
"k8s-
${
var
.
site_name
}
-
master"
image_id
=
data
.
openstack_images_image_v2
.
ubuntu
.
id
image_id
=
data
.
openstack_images_image_v2
.
ubuntu
.
id
# 4 cores 4 GB RAM
# 4 cores 4 GB RAM
flavor_id
=
data
.
openstack_compute_flavor_v2
.
master-flavor
.
id
flavor_id
=
data
.
openstack_compute_flavor_v2
.
master-flavor
.
id
...
@@ -116,7 +116,7 @@ resource "openstack_compute_instance_v2" "master" {
...
@@ -116,7 +116,7 @@ resource "openstack_compute_instance_v2" "master" {
}
}
resource
"openstack_compute_instance_v2"
"nfs"
{
resource
"openstack_compute_instance_v2"
"nfs"
{
name
=
"k8s-nfs"
name
=
"k8s-
${
var
.
site_name
}
-
nfs"
image_id
=
data
.
openstack_images_image_v2
.
ubuntu
.
id
image_id
=
data
.
openstack_images_image_v2
.
ubuntu
.
id
flavor_id
=
data
.
openstack_compute_flavor_v2
.
worker-flavor
.
id
flavor_id
=
data
.
openstack_compute_flavor_v2
.
worker-flavor
.
id
security_groups
=
[
"default"
,
openstack_compute_secgroup_v2
.
ping
.
name
,
openstack_compute_secgroup_v2
.
ssh
.
name
]
security_groups
=
[
"default"
,
openstack_compute_secgroup_v2
.
ping
.
name
,
openstack_compute_secgroup_v2
.
ssh
.
name
]
...
@@ -131,7 +131,7 @@ resource "openstack_compute_instance_v2" "nfs" {
...
@@ -131,7 +131,7 @@ resource "openstack_compute_instance_v2" "nfs" {
}
}
resource
"openstack_compute_instance_v2"
"ingress"
{
resource
"openstack_compute_instance_v2"
"ingress"
{
name
=
"k8s-w-ingress"
name
=
"k8s-
${
var
.
site_name
}
-
w-ingress"
image_id
=
data
.
openstack_images_image_v2
.
ubuntu
.
id
image_id
=
data
.
openstack_images_image_v2
.
ubuntu
.
id
flavor_id
=
data
.
openstack_compute_flavor_v2
.
worker-flavor
.
id
flavor_id
=
data
.
openstack_compute_flavor_v2
.
worker-flavor
.
id
security_groups
=
[
"default"
,
openstack_compute_secgroup_v2
.
ping
.
name
,
openstack_compute_secgroup_v2
.
ssh
.
name
,
openstack_compute_secgroup_v2
.
http
.
name
]
security_groups
=
[
"default"
,
openstack_compute_secgroup_v2
.
ping
.
name
,
openstack_compute_secgroup_v2
.
ssh
.
name
,
openstack_compute_secgroup_v2
.
http
.
name
]
...
@@ -147,7 +147,7 @@ resource "openstack_compute_instance_v2" "ingress" {
...
@@ -147,7 +147,7 @@ resource "openstack_compute_instance_v2" "ingress" {
resource
"openstack_compute_instance_v2"
"worker"
{
resource
"openstack_compute_instance_v2"
"worker"
{
count
=
var
.
extra_workers
count
=
var
.
extra_workers
name
=
"k8s-worker-
${
count
.
index
}
"
name
=
"k8s-
${
var
.
site_name
}
-
worker-
${
count
.
index
}
"
image_id
=
data
.
openstack_images_image_v2
.
ubuntu
.
id
image_id
=
data
.
openstack_images_image_v2
.
ubuntu
.
id
flavor_id
=
data
.
openstack_compute_flavor_v2
.
worker-flavor
.
id
flavor_id
=
data
.
openstack_compute_flavor_v2
.
worker-flavor
.
id
security_groups
=
[
"default"
,
openstack_compute_secgroup_v2
.
ping
.
name
,
openstack_compute_secgroup_v2
.
ssh
.
name
]
security_groups
=
[
"default"
,
openstack_compute_secgroup_v2
.
ping
.
name
,
openstack_compute_secgroup_v2
.
ssh
.
name
]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment