diff --git a/group_vars/safouene b/group_vars/safouene new file mode 100644 index 0000000..c16e1bc --- /dev/null +++ b/group_vars/safouene @@ -0,0 +1,19 @@ + +users: + - name: ubuntu + group: ubuntu + shell: '/bin/bash' + ssh_pub_keys: + - 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDCnE9f5qZQVHiMwri4Jk/qetJ74jsZCm9owpvkTNkK2l+FnTX9QmC3HYkMkbRBNTm2a5c7YMCYPLEQfoNJefLW3UqzQmnHiCkquX1bgVF4S5c3CPF86DNC4bLtoo/62UUUqqpSiHJBx8JuaU8fNxv/rRyoGvWxg05CFEm+AEc59Ykm8g7Q6q1lNrUP43aKZp384kbXjMYJZj66oRidMi+JlQQHpFPFIhut98glKARW/HdDMOCTp21x8h8WY3mTx4YhhS7kcFpRZugv2IEwV1aoCx+ANzZzic0gMRx2i19JnaSPRu/R5ZJ2fxgVFEtODCqx4xCTLlV+B0VCSVrfWu1CJ+mtuKHFkquBRde/6gBMyBeDWUvZdljaIeMpfsIH4mKpH1ZkppQHpXqAhH7bLorb6i9dHTOhKrLH7+Cp8+VRJ2r1Gm3j3gyvqs/zEhMykBMYqnW21MSVGeX3+FM9qnPTKJ2IZmAddS2VHtFJkGe6VKmkaXTcO8R1ck4ulJ68HPE= ubuntu@k8s-controller' + +# haproxy +haproxy_local_config_path: "reverse-proxy/haproxy.cfg.j2" +haproxy_list_tls: + - wildcard.felcloud.io +lb_local_config_path: "reverse-proxy/lb.cfg.j2" + + +#vars +k8s_master_groupname: master +k8s_worker_groupname: worker + diff --git a/infra/safouene.json b/infra/safouene.json new file mode 100644 index 0000000..c21ba56 --- /dev/null +++ b/infra/safouene.json @@ -0,0 +1,149 @@ +{ + "application_name": "safouene", + "network": [{ + "name": "safouene_network", + "bastion_access": "yes", + "subnet": { + "name":"saf_subnet", + "ip_version": 4, + "cidr": "172.16.0.0/24", + "dns_servers": ["8.8.8.8"], + "linked_router": [{"router_name": "safouene_router"}] + } + }], + + "router": [{ + "router_name": "safouene_router", + "router_external_gateway": "0048fce6-c715-4106-a810-473620326cb0", + "linked_subnets": [{ + "router_interface_name":"saf_interface", + "subnet_name":"saf_subnet"}] + }], + + "port": [ + ], + + "security_group": [], + "bastion_to_use": "safouene", + "instance": [{ + "name": "kmaster1", + "az": "nova", + "flavor": "v3-starter-4", + "image": "Ubuntu 22.04 - Cloud Image", + "keypair": "saf_controller", + "security_group": ["safouene_sg"], + "inventory_group": "master", + "network": [{"name": "safouene_network"}] + }, + { + "name": "kmaster2", + "az": "nova", + "flavor": "v3-starter-4", + "image": "Ubuntu 22.04 - Cloud Image", + "keypair": "saf_controller", + "security_group": ["safouene_sg"], + "inventory_group": "master", + "network": [{"name": "safouene_network"}] + }, + { + "name": "kmaster3", + "az": "nova", + "flavor": "v3-starter-4", + "image": "Ubuntu 22.04 - Cloud Image", + "keypair": "saf_controller", + "security_group": ["safouene_sg"], + "inventory_group": "master", + "network": [{"name": "safouene_network"}] + }, + { + "name": "kworker1", + "az": "nova", + "flavor": "v3-standard-2", + "image": "Ubuntu 22.04 - Cloud Image", + "keypair": "saf_controller", + "security_group": ["safouene_sg"], + "inventory_group": "worker", + "network": [{"name": "safouene_network"}] + }, + + { + "name": "kworker2", + "az": "nova", + "flavor": "v3-standard-2", + "image": "Ubuntu 22.04 - Cloud Image", + "keypair": "saf_controller", + "security_group": ["safouene_sg"], + "inventory_group": "worker", + "network": [{"name": "safouene_network"}] + }, + + { + "name": "kworker3", + "az": "nova", + "flavor": "v3-standard-2", + "image": "Ubuntu 22.04 - Cloud Image", + "keypair": "saf_controller", + "security_group": ["safouene_sg"], + "inventory_group": "worker", + "network": [{"name": "safouene_network"}] + }, + + { + "name": "lb1", + "az": "nova", + "flavor": "v3-starter-1", + "image": "Ubuntu 22.04 - Cloud Image", + "keypair": "saf_controller", + "security_group": ["safouene_sg"], + "inventory_group": "lb", + "network": [{ + "name": "safouene_network", + "fip": { + "name": "fip_lb", + "pool": "public" + } + }] + + }, + + + { + "name": "haproxy", + "az": "nova", + "flavor": "v3-starter-1", + "image": "Ubuntu 22.04 - Cloud Image", + "keypair": "saf_controller", + "security_group": ["safouene_sg"], + "inventory_group": "loadbalancer", + "network": [{ + "name": "safouene_network", + "fip": { + "name": "fip_haproxy", + "pool": "public" + } + }] + + }, + + + { + "name": "bastionk8s", + "az": "nova", + "flavor": "v3-starter-1", + "image": "Ubuntu 22.04 - Cloud Image", + "keypair": "saf_controller", + "security_group": ["safouene_sg"], + "inventory_group": "safouene_bastion", + "network": [{ + "name": "safouene_network", + "fip": { + "name": "fip_bastion", + "pool": "public" + } + }] + } + + ], + "volume": [ + ] +} diff --git a/safouene.sh b/safouene.sh new file mode 100644 index 0000000..c870b92 --- /dev/null +++ b/safouene.sh @@ -0,0 +1,6 @@ +#!/bin/bash +export OS_CLOUD="vexxhost_ams1" +export PULUMI_STACK="staging" +export PULUMI_SUB_STACK="safouene" +export PULUMI_CONFIG_PASSPHRASE_FILE="/etc/ansible/pulumi_passphrase" +