From 70284e8eb4a0a60119cfaf8d42ec1e78cba80ce5 Mon Sep 17 00:00:00 2001 From: s478839 Date: Sun, 22 Jan 2023 20:24:47 +0100 Subject: [PATCH] fix webservice_init --- lab4/webservice-init.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/lab4/webservice-init.py b/lab4/webservice-init.py index 0cf0617..56da993 100644 --- a/lab4/webservice-init.py +++ b/lab4/webservice-init.py @@ -38,14 +38,20 @@ if not vnet: ) print(f"Utworzono sieć wirtualną {vnet.data_model.name} ({vnet.data_model.ip_range})") -webservice_init=r''' -#cloud-config +webservice_init=r'''#cloud-config +packages: + - apt-transport-https + - ca-certificates + - curl + - gnupg-agent + - software-properties-common runcmd: - - git clone https://git.wmi.amu.edu.pl/s478839/dpzc-hetzner.git - - cd lab4 + - curl -fsSL https://git.wmi.amu.edu.pl/s478839/dpzc-hetzner/raw/branch/master/lab4/webservice > /root/webservice + - cd /root/ - chmod +x webservice - ./webservice ''' + for i in range(NUM_OF_SERVERS): webservice_server = client.servers.create( name=f"{PREFIX}-webservice-{i+1}",