Add osc project profiles on POWDER to source control to make the profiles consistent...
[it/test.git] / XTesting / powder-profiles / ubuntu-20
diff --git a/XTesting/powder-profiles/ubuntu-20 b/XTesting/powder-profiles/ubuntu-20
new file mode 100644 (file)
index 0000000..6f87865
--- /dev/null
@@ -0,0 +1,22 @@
+"""Ubuntu 20.04 on a hardware type of your choice."""
+
+import geni.portal as portal
+# Import the ProtoGENI library.
+import geni.rspec.pg as rspec
+
+pc = portal.Context()
+
+pc.defineParameter('hardware_type', 'Hardware type', portal.ParameterType.NODETYPE, '')
+
+params = pc.bindParameters()
+
+request = pc.makeRequestRSpec()
+
+node = request.RawPC('node-0')
+node.hardware_type = params.hardware_type
+node.disk_image = 'urn:publicid:IDN+emulab.net+image+emulab-ops//UBUNTU20-64-STD'
+
+# manipulate the authorized key for root access 
+node.addService(rspec.Execute(shell="bash", command="sudo chown osc_int  -R /root && tail -1 ~/.ssh/authorized_keys >> /root/.ssh/authorized_keys && rm /root/.ssh/id_rsa* && sudo chown root -R /root"))
+
+pc.printRequestRSpec(request)