PowerVS instance was replaced
diff --git a/README.md b/README.md
index 1a2f11f..5c791c2 100644
--- a/README.md
+++ b/README.md
@@ -142,18 +142,3 @@
```
-Power Instances
----
-
-Power isntances are configured in a special hard-coded `power` environment. The
-`power` environemnt section, besides the `api_key`, should contain additional
-required fields:
-
-```ini
-[ibmcloud.power]
-api_key = ...
-api_url = https://lon.power-iaas.cloud.ibm.com/pcloud/v1/cloud-instances/<cloud_instance_id>
-crn = ...
-instance_id = ...
-```
-
diff --git a/production b/production
index 26d206d..a101e2e 100644
--- a/production
+++ b/production
@@ -20,24 +20,6 @@
ram: 4
ci_agents:
hosts:
- couchdb-ci-ubuntu-2:
- instance:
- created_at: '2021-08-19T13:25:22.000Z'
- id: 6c00d3dd-649c-4dda-baa7-1099a92d7ebc
- name: couchdb-ci-ubuntu-2
- profile: dedicated
- subnet: null
- vpc: s922
- zone: none
- ip_addrs:
- bastion_host: null
- bastion_ip: null
- private: 192.168.151.219
- public: 158.175.162.219
- system:
- arch: power
- num_cpus: 2
- ram: 16
couchdb-worker-x86-64-debian-dal-1-01:
instance:
created_at: '2020-12-04T17:37:42Z'
@@ -195,3 +177,16 @@
arch: s390x
num_cpus: 4
ram: 8
+ ubuntu:
+ instance:
+ id: ubuntu
+ name: ubuntu
+ subnet: null
+ ip_addrs:
+ bastion_host: null
+ bastion_ip: null
+ public: 140.211.10.121
+ system:
+ arch: ppc64le
+ num_cpus: 8
+ ram: 16
diff --git a/ssh.cfg b/ssh.cfg
index 658874a..9a9d020 100644
--- a/ssh.cfg
+++ b/ssh.cfg
@@ -7,15 +7,6 @@
ControlPath /tmp/ansible-%r@%h:%p
ControlPersist 30m
-Host couchdb-ci-ubuntu-2
- Hostname 158.175.162.219
- User ubuntu
- ForwardAgent yes
- StrictHostKeyChecking no
- ControlMaster auto
- ControlPath /tmp/ansible-%r@%h:%p
- ControlPersist 30m
-
Host couchdb-worker-x86-64-debian-dal-1-01
Hostname 10.240.0.16
User root
@@ -73,3 +64,12 @@
ControlPath /tmp/ansible-%r@%h:%p
ControlPersist 30m
+Host ubuntu
+ Hostname 140.211.10.121
+ User ubuntu
+ ForwardAgent yes
+ StrictHostKeyChecking no
+ ControlMaster auto
+ ControlPath /tmp/ansible-%r@%h:%p
+ ControlPersist 30m
+
diff --git a/tools/gen-config b/tools/gen-config
index 0f02504..a47c44d 100755
--- a/tools/gen-config
+++ b/tools/gen-config
@@ -13,7 +13,6 @@
# Environments read from config file
# {"cloudant": {"api_key": "abc123", ...}
-# {"power": {"api_key", "cde456", ...}
#
ENV = {}
@@ -117,8 +116,6 @@
for env in ENV:
if env != "power":
yield from list_x86_instances(env)
- if env == "power":
- yield from list_power_instances(env)
for inst in EXTRA.values():
yield inst
@@ -136,24 +133,6 @@
yield instance
url = body.get("next")
-
-def list_power_instances(env):
- # It's really just one instance but to keep up with the shape of the rest
- # of the code emit it as a generated item
- if not ENV[env]["instance_id"]:
- Exception("Power instances require an 'instance_id' setting")
-
- instance_id = ENV[env]["instance_id"]
- url = ENV[env]["api_url"] + "/pvm-instances/" + instance_id
- sess = SESS[env]
- resp = sess.get(url, params=params(env))
- instance = resp.json()
- instance["name"] = instance["serverName"]
- instance["system"] = {"arch": "power"}
- yield instance
-
-
-
def params(env):
params = {"limit": 100}
if ENV[env].get("api_version"):
@@ -242,40 +221,6 @@
}
}
-
-def load_power_ci_agent(ci_agents, instance):
- if instance["status"] != "ACTIVE":
- return
-
- name = instance["name"]
- if name in ci_agents:
- print(f"Duplicate ci_agent found {name}")
- exit(2)
-
- ci_agents[name] = {
- "instance": {
- "id": instance["pvmInstanceID"],
- "name": instance["serverName"],
- "created_at": instance["creationDate"],
- "profile": instance["procType"],
- "vpc" : instance["sysType"],
- "zone": instance["placementGroup"],
- "subnet" : None
- },
- "ip_addrs": {
- "bastion_ip": None,
- "bastion_host": None,
- "public": instance["addresses"][0]["externalIP"],
- "private": instance["addresses"][0]["ip"]
- },
- "system": {
- "arch": "power",
- "num_cpus": instance["virtualCores"]["assigned"],
- "ram": instance["memory"]
- }
- }
-
-
def load_s390x_ci_agent(ci_agents, instance):
name = instance["name"]
if name in ci_agents:
@@ -296,6 +241,25 @@
"system": instance["system"]
}
+def load_ppc64le_ci_agent(ci_agents, instance):
+ name = instance["name"]
+ if name in ci_agents:
+ print(f"Duplicate ci_agent found {name}")
+ exit(2)
+
+ ci_agents[name] = {
+ "instance": {
+ "id": instance["instance_id"],
+ "name" : instance["name"],
+ "subnet": None
+ },
+ "ip_addrs": {
+ "bastion_ip": None,
+ "bastion_host": None,
+ "public": instance["ip_addr"]
+ },
+ "system": instance["system"]
+ }
def get_private_ip(instance):
ip = instance["primary_network_interface"]["primary_ipv4_address"]
@@ -317,7 +281,7 @@
assert subnet not in subnets
subnets[subnet] = (ip_addr, host)
for (host, ci_agent) in ci_agents.items():
- if ci_agent["system"]["arch"] in ["power", "s390x"]:
+ if ci_agent["system"]["arch"] in ["ppc64le", "s390x"]:
# Power & s390x an external IP without bastions
continue
subnet = ci_agent["instance"]["subnet"]
@@ -373,7 +337,7 @@
entry = bastion_tmpl.format(**args)
handle.write(entry)
for host, info in sorted(ci_agents.items()):
- if info["system"]["arch"] in ["power", "s390x"]:
+ if info["system"]["arch"] in ["ppc64le", "s390x"]:
# Power or s390x use an external IP directly
args = {
"user": "ubuntu",
@@ -427,8 +391,8 @@
load_bastion(bastions, instance)
elif instance["name"].startswith("couchdb-worker"):
load_ci_agent(ci_agents, instance)
- elif instance["system"]["arch"] == "power":
- load_power_ci_agent(ci_agents, instance)
+ elif instance["system"]["arch"] == "ppc64le":
+ load_ppc64le_ci_agent(ci_agents, instance)
elif instance["system"]["arch"] == "s390x":
load_s390x_ci_agent(ci_agents, instance)