diff --git a/Public_cloud/loadbalancer-init.py b/Public_cloud/loadbalancer-init.py index 794390d..60620d6 100644 --- a/Public_cloud/loadbalancer-init.py +++ b/Public_cloud/loadbalancer-init.py @@ -54,7 +54,7 @@ for i in range(NUM_OF_SERVERS): webservice_server = client.servers.create( name=f"{PREFIX}-webservice-{i+1}", server_type=ServerType("cx11"), - image=Image(name="ubuntu-20.04"), + image=Image(name="ubuntu-22.04"), ssh_keys=[ssh_key], networks=[vnet], location=Location("hel1"), @@ -83,7 +83,7 @@ try: timeout=10, retries=3, http=LoadBalancerHealtCheckHttp( - path="/factors/10", + path="/factors/32", status_codes=["2??", "3??"], tls=False ) diff --git a/Public_cloud/reset.py b/Public_cloud/reset.py index 370f799..f7be8ed 100644 --- a/Public_cloud/reset.py +++ b/Public_cloud/reset.py @@ -20,4 +20,7 @@ if volume: action = client.volumes.detach(volume) action.wait_until_finished() action = client.volumes.delete(volume) - print("Volume removed") \ No newline at end of file + print("Volume removed") + +loadbalancer = client.load_balancers.get_by_name(f"{PREFIX}-loadbalancer") +loadbalancer.delete() \ No newline at end of file