Skip to content

Instantly share code, notes, and snippets.

@electrocucaracha
Last active June 12, 2019 22:31
Show Gist options
  • Save electrocucaracha/f11f9ed3fd32da6aa8c5c11d17d59152 to your computer and use it in GitHub Desktop.
Save electrocucaracha/f11f9ed3fd32da6aa8c5c11d17d59152 to your computer and use it in GitHub Desktop.
Podman change
commit ef164679af86749aa5edc660f9fb13235bd6c234
Author: Victor Morales <victor.morales@intel.com>
Date: Thu May 30 14:43:55 2019 -0700
Remove local registry
diff --git a/vagrant/installer.sh b/vagrant/installer.sh
index 58a0a5c..252c8b2 100755
--- a/vagrant/installer.sh
+++ b/vagrant/installer.sh
@@ -60,6 +60,11 @@ ansible-playbook -vvv -i ./inventory/hosts.ini configure-qat-envoy.yml | tee set
# Kata containers configuration
if [[ "${CONTAINER_MANAGER:-docker}" == "crio" ]]; then
+ case ${ID,,} in
+ rhel|centos|fedora)
+ sudo yum install -y podman
+ ;;
+ esac
sudo -E pip install PyYAML
kube_version=$(parse_yaml inventory/group_vars/k8s-cluster.yml "['kube_version']")
if vercmp "${kube_version#*v}" '<' 1.14; then
@@ -71,11 +76,9 @@ if [[ "${CONTAINER_MANAGER:-docker}" == "crio" ]]; then
kubectl apply -f https://raw.githubusercontent.com/kata-containers/packaging/master/kata-deploy/kata-rbac.yaml
kubectl apply -f https://raw.githubusercontent.com/kata-containers/packaging/master/kata-deploy/kata-deploy.yaml
- sudo docker run -d -p 5000:5000 --restart=always --name registry registry:2
for img in intel-qat-plugin envoy-qat; do
- sudo docker tag "${img}:devel" "localhost:5000/${img}:devel"
- sudo docker push "localhost:5000/${img}:devel"
+ sudo docker save "${img}:devel" | sudo podman load
done
- kubectl set image daemonset/intel-qat-kernel-plugin intel-qat-kernel-plugin=localhost:5000/intel-qat-plugin:devel
+ kubectl set image daemonset/intel-qat-kernel-plugin intel-qat-kernel-plugin=localhost/intel-qat-plugin:devel
fi
./postchecks_qat_plugin.sh
diff --git a/vagrant/k8s_resources/crio/k6-non-qat.yml b/vagrant/k8s_resources/crio/k6-non-qat.yml
index c7799bf..f0d48f3 100644
--- a/vagrant/k8s_resources/crio/k6-non-qat.yml
+++ b/vagrant/k8s_resources/crio/k6-non-qat.yml
@@ -50,7 +50,7 @@ spec:
spec:
containers:
- name: k6-test
- image: localhost:5000/loadimpact/k6:custom
+ image: localhost/loadimpact/k6:custom
command: [ "k6", "run", "--out", "influxdb=http://metrics-db-no-qat-influxdb.default.svc.cluster.local:8086", "/opt/script.js" ]
volumeMounts:
- name: k6-volume
diff --git a/vagrant/k8s_resources/crio/non-qat-deploy.yml b/vagrant/k8s_resources/crio/non-qat-deploy.yml
index b3961be..672a934 100644
--- a/vagrant/k8s_resources/crio/non-qat-deploy.yml
+++ b/vagrant/k8s_resources/crio/non-qat-deploy.yml
@@ -28,7 +28,7 @@ spec:
- name: nginx
image: nginx:latest
- name: envoy-sidecar
- image: localhost:5000/envoy-qat:devel
+ image: localhost/envoy-qat:devel
imagePullPolicy: IfNotPresent
command:
- "/envoy-static"
diff --git a/vagrant/k8s_resources/crio/qat/k6-qat.yml b/vagrant/k8s_resources/crio/qat/k6-qat.yml
index 0d3547b..9cbee1e 100644
--- a/vagrant/k8s_resources/crio/qat/k6-qat.yml
+++ b/vagrant/k8s_resources/crio/qat/k6-qat.yml
@@ -50,7 +50,7 @@ spec:
spec:
containers:
- name: k6-test
- image: localhost:5000/loadimpact/k6:custom
+ image: localhost/loadimpact/k6:custom
command: [ "k6", "run", "--out", "influxdb=http://metrics-db-qat-influxdb.default.svc.cluster.local:8086", "/opt/script.js" ]
volumeMounts:
- name: k6-volume
diff --git a/vagrant/k8s_resources/crio/qat/qat-deploy.yml b/vagrant/k8s_resources/crio/qat/qat-deploy.yml
index d56c541..f5580da 100644
--- a/vagrant/k8s_resources/crio/qat/qat-deploy.yml
+++ b/vagrant/k8s_resources/crio/qat/qat-deploy.yml
@@ -28,7 +28,7 @@ spec:
- name: nginx
image: nginx:latest
- name: envoy-sidecar
- image: localhost:5000/envoy-qat:devel
+ image: localhost/envoy-qat:devel
imagePullPolicy: IfNotPresent
command:
- "bash"
diff --git a/vagrant/sample_plugin.sh b/vagrant/sample_plugin.sh
index 8d21984..bc6474f 100755
--- a/vagrant/sample_plugin.sh
+++ b/vagrant/sample_plugin.sh
@@ -21,8 +21,7 @@ if ! sudo docker images | grep -e $k6_image; then
pushd ../k6
sudo docker image build -t $k6_image -f Dockerfile .
if [[ "${CONTAINER_MANAGER:-docker}" == "crio" ]]; then
- sudo docker tag $k6_image localhost:5000/$k6_image
- sudo docker push localhost:5000/$k6_image
+ sudo docker save "$k6_image" | sudo podman load
fi
popd
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment