X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=XTesting%2Fpowder-profiles%2Fosc-ricplt;fp=XTesting%2Fpowder-profiles%2Fosc-ricplt;h=59b849f72dc6e91ca9ad4b6df2565af3f7a49785;hb=9901302381b93bc7756d914465d6b11d95ef37f2;hp=0000000000000000000000000000000000000000;hpb=041f33871b8a86335388a76914844316cfbff998;p=it%2Ftest.git diff --git a/XTesting/powder-profiles/osc-ricplt b/XTesting/powder-profiles/osc-ricplt new file mode 100644 index 0000000..59b849f --- /dev/null +++ b/XTesting/powder-profiles/osc-ricplt @@ -0,0 +1,27 @@ +"""Install the latest OSC RIC platform with 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' + +node.addService(rspec.Execute(shell="bash", command="sudo git clone \"https://gerrit.o-ran-sc.org/r/ric-plt/ric-dep\" /ric-plt")) +node.addService(rspec.Execute(shell="bash", command="cd /ric-plt/bin && sudo cat install_k8s_and_helm.sh | sed -e '341d' > /tmp/12")) +node.addService(rspec.Execute(shell="bash", command="sudo sed '341 i kubectl apply -f \"https:\/\/raw.githubusercontent.com\/flannel-io\/flannel\/9de10c12c8266b0cfe09bc0d5c969ae28832239f\/Documentation\/kube-flannel.yml\"' /tmp/12 > /tmp/123")) + +node.addService(rspec.Execute(shell="bash", command="cd /ric-plt/bin && sudo cp /tmp/123 install_k8s_and_helm.sh && sudo ./install_k8s_and_helm.sh 2>&1 | tee /tmp/k8s.log")) +node.addService(rspec.Execute(shell="bash", command="cd /ric-plt/bin && sudo ./install_common_templates_to_helm.sh 2>&1 >> /tmp/common.log")) +node.addService(rspec.Execute(shell="bash", command="cd /ric-plt/RECIPE_EXAMPLE && sudo rm example_recipe_latest_stable.yaml && sudo ln -s example_recipe_oran_f_release.yaml example_recipe_latest_stable.yaml")) +node.addService(rspec.Execute(shell="bash", command="cd /ric-plt/bin && sudo cat ../RECIPE_EXAMPLE/example_recipe_latest_stable.yaml | sed -e 's/10\.0\.0\.1//g' > /tmp/example_recipe_latest_stable.yaml.overwrite && sudo cp /tmp/example_recipe_latest_stable.yaml.overwrite ../RECIPE_EXAMPLE/example_recipe_latest_stable.yaml.overwrite && sudo ./install -f ../RECIPE_EXAMPLE/example_recipe_latest_stable.yaml.overwrite 2>&1 | tee /tmp/install.log")) +pc.printRequestRSpec(request)