Compare commits
3 commits
ad52a3c054
...
b497844e59
Author | SHA1 | Date | |
---|---|---|---|
Magnus Andersson | b497844e59 | ||
Magnus Andersson | 47d77c5fde | ||
Magnus Andersson | 618b273ca8 |
46
IaC-test/lb.tf
Normal file
46
IaC-test/lb.tf
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
|
||||||
|
# Netowrk port
|
||||||
|
resource "openstack_networking_port_v2" "lb1-port-dco" {
|
||||||
|
name = "lb1-${replace(var.dns_suffix,".","-")}-${local.dcodc}-port"
|
||||||
|
network_id = data.openstack_networking_network_v2.public-dco.id
|
||||||
|
# A list of security group ID
|
||||||
|
security_group_ids = [
|
||||||
|
resource.openstack_networking_secgroup_v2.ssh-from-jump-hosts-dco.id,
|
||||||
|
]
|
||||||
|
admin_state_up = "true"
|
||||||
|
provider = openstack.dco
|
||||||
|
}
|
||||||
|
|
||||||
|
# Boot volume
|
||||||
|
# Boot volume for node
|
||||||
|
resource "openstack_blockstorage_volume_v3" "lb1volumeboot-dco" {
|
||||||
|
name = "lb1-${replace(var.dns_suffix,".","-")}-${local.dcodc}-vol"
|
||||||
|
description = "OS volume for lb1.matrix.test.sunet.se"
|
||||||
|
size = 50
|
||||||
|
image_id = data.openstack_images_image_v2.debian12image-dco.id
|
||||||
|
enable_online_resize = true # Allow us to resize volume while attached.
|
||||||
|
provider = openstack.dco
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "openstack_compute_instance_v2" "lb1-node-dco" {
|
||||||
|
name = "lb1.${var.dns_suffix}"
|
||||||
|
flavor_name = "${var.lb_instance_type}"
|
||||||
|
key_pair = "${var.keynameworkers}"
|
||||||
|
provider = openstack.dco
|
||||||
|
security_groups = [
|
||||||
|
resource.openstack_networking_secgroup_v2.ssh-from-jump-hosts-dco.name
|
||||||
|
]
|
||||||
|
|
||||||
|
block_device {
|
||||||
|
uuid = resource.openstack_blockstorage_volume_v3.lb1volumeboot-dco.id
|
||||||
|
source_type = "volume"
|
||||||
|
destination_type = "volume"
|
||||||
|
boot_index = 0
|
||||||
|
}
|
||||||
|
|
||||||
|
network {
|
||||||
|
port = resource.openstack_networking_port_v2.lb1-port-dco.id
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -60,6 +60,10 @@ variable "worker_instance_type" {
|
||||||
default = "b2.c4r16"
|
default = "b2.c4r16"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
variable "lb_instance_type" {
|
||||||
|
default = "b2.c2r4"
|
||||||
|
}
|
||||||
|
|
||||||
variable "worker_name" {
|
variable "worker_name" {
|
||||||
default = "k8sw"
|
default = "k8sw"
|
||||||
}
|
}
|
||||||
|
|
14
k8s/examples/registry/matrix-registry-service.yaml
Normal file
14
k8s/examples/registry/matrix-registry-service.yaml
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: matrix-registry-service
|
||||||
|
namespace: matrix-registry
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
k8s-app: matrix-registry
|
||||||
|
ports:
|
||||||
|
- name: httpregistry
|
||||||
|
protocol: TCP
|
||||||
|
port: 5000
|
||||||
|
targetPort: registry
|
1
lb1.matrix.test.sunet.se/README
Symbolic link
1
lb1.matrix.test.sunet.se/README
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../README
|
Loading…
Reference in a new issue