This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import openshift as oc | |
import redfish | |
import time | |
def bmc_hard_reboot(bmc_url, bmc_user, bmc_pass): | |
bmc_host = bmc_url.split('://')[-1].split('/')[0] | |
bmc_prefix = '/' + '/'.join(bmc_url.split('://')[-1].split('/')[1:]) | |
headers = {'Content-Type': 'application/json'} | |
body = {'ResetType': 'ForceRestart'} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: v1 | |
kind: Namespace | |
metadata: | |
name: testns | |
--- | |
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
name: index-html-configmap |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: v1 | |
kind: Namespace | |
metadata: | |
name: testns | |
--- | |
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
name: index-html-configmap |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: httpd | |
namespace: test | |
spec: | |
replicas: 2 | |
selector: | |
matchLabels: | |
app: httpd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: machineconfiguration.openshift.io/v1 | |
kind: MachineConfig | |
metadata: | |
annotations: | |
machineconfiguration.openshift.io/generated-by-controller-version: 910f22cb1550ad7bb02b82c5dc05062b1566ce5f | |
creationTimestamp: "2020-05-13T18:39:58Z" | |
generation: 1 | |
labels: | |
machineconfiguration.openshift.io/role: worker-lb | |
name: 00-worker-lb |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -x | |
set -e | |
for node in $(oc --config $KUBECONFIG get nodes -o template --template='{{range .items}}{{.metadata.uid}}:{{.metadata.name}}{{"\n"}}{{end}}'); do | |
node_name=$(echo $node | cut -f2 -d':') | |
machine_name=$CLUSTER_NAME-$(echo $node_name | grep -oE "(master|worker)-[0-9]+") | |
if [[ "$machine_name" == *"worker"* ]]; then | |
echo "Skipping worker $machine_name because it should have inspection data to link automatically" | |
continue |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/02_configure_host.sh b/02_configure_host.sh | |
index 7451bbc..687f8fe 100755 | |
--- a/02_configure_host.sh | |
+++ b/02_configure_host.sh | |
@@ -104,9 +104,14 @@ if [ "$MANAGE_INT_BRIDGE" == "y" ]; then | |
# external access so we need to make sure we maintain dhcp config if its available | |
if [ "$INT_IF" ]; then | |
echo -e "DEVICE=$INT_IF\nTYPE=Ethernet\nONBOOT=yes\nNM_CONTROLLED=no\nBRIDGE=baremetal" | sudo dd of=/etc/sysconfig/network-scripts/ifcfg-$INT_IF | |
- if sudo nmap --script broadcast-dhcp-discover -e $INT_IF | grep "IP Offered" ; then | |
- grep -q BOOTPROTO /etc/sysconfig/network-scripts/ifcfg-baremetal || (echo -e "\nBOOTPROTO=dhcp\n" | sudo tee -a /etc/sysconfig/network-scripts/ifcfg-baremetal) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Run the following commands on the hypervisor host. Any host used for InfraRed virt deployments should do the job. | |
## Download RHEL8 beta image | |
curl -o /var/lib/libvirt/images/rhel-guest-image-8.0-1690.x86_64.qcow2 http:///rhel-guest-image-8.0-1690.x86_64.qcow2 | |
## Downloag libguestfs appliance to allow virt-customize on RHEL7 hypervirosr | |
curl -o /tmp/libguestfs_appliance.tar.gx http://download.libguestfs.org/binaries/appliance/appliance-1.40.1.tar.xz | |
tar -C /tmp/ -xvf /tmp/libguestfs_appliance.tar.gx | |
## Create the disk file to be used for the standalone VM | |
qemu-img create -f qcow2 /var/lib/libvirt/images/standalone.qcow2 100G |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pushd /home/rhhi-ci/jenkins/workspace/rhhi.next-virt-customized | |
source rhhi-qe-venv/bin/activate | |
ansible-playbook -i rhhi-qe-core/s2i/linchpin-provisioner/linchpin_workspace/inventories/rhhi.inventory rhhi-qe-core/s2i/linchpin-provisioner/linchpin_workspace/hooks/ansible/rhhi-setup/iptables_console.yaml -e @rhhi-qe-core/s2i/linchpin-provisioner/linchpin_workspace/hooks/ansible/rhhi-setup/extravars.yaml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/OpenShift/assets/deploy/90_metal3_baremetalhost_crd.yaml b/OpenShift/assets/deploy/90_metal3_baremetalhost_crd.yaml | |
deleted file mode 100644 | |
index 0c29c82..0000000 | |
--- a/OpenShift/assets/deploy/90_metal3_baremetalhost_crd.yaml | |
+++ /dev/null | |
@@ -1,371 +0,0 @@ | |
-apiVersion: apiextensions.k8s.io/v1beta1 | |
-kind: CustomResourceDefinition | |
-metadata: | |
- name: baremetalhosts.metal3.io |
NewerOlder