Skip to content

Commit 49cee7d

Browse files
Merge pull request #230 from IBM/fix/demo-magic
Fix/demo magic
2 parents ec33fe2 + 3885f74 commit 49cee7d

File tree

2 files changed

+23
-12
lines changed

2 files changed

+23
-12
lines changed

Makefile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,27 @@ publish:
478478
$(ISHIELD_REPO_ROOT)/build/publish_images.sh
479479
$(ISHIELD_REPO_ROOT)/build/publish_bundle_ocm.sh
480480

481+
setup-demo:
482+
@echo
483+
@echo setting image
484+
cp $(SHIELD_OP_DIR)config/manager/kustomization.yaml $(TMP_DIR)kustomization.yaml #copy original file to tmp dir.
485+
cd $(SHIELD_OP_DIR)config/manager && kustomize edit set image controller=$(DEMO_ISHIELD_OP_IMAGE_NAME)
486+
@echo installing operator
487+
kustomize build $(SHIELD_OP_DIR)config/default | kubectl apply --validate=false -f -
488+
cp $(TMP_DIR)kustomization.yaml $(SHIELD_OP_DIR)config/manager/kustomization.yaml
489+
@echo prepare cr
490+
@echo copy cr into tmp dir
491+
cp $(SHIELD_OP_DIR)config/samples/apis_v1alpha1_integrityshield_local.yaml $(TMP_CR_FILE)
492+
@echo insert image
493+
yq write -i $(TMP_CR_FILE) spec.logger.image $(DEMO_ISHIELD_LOGGING_IMAGE_NAME)
494+
yq write -i $(TMP_CR_FILE) spec.logger.imagePullPolicy Always
495+
yq write -i $(TMP_CR_FILE) spec.server.image $(DEMO_ISHIELD_SERVER_IMAGE_NAME)
496+
yq write -i $(TMP_CR_FILE) spec.server.imagePullPolicy Always
497+
@echo setup keyring configs
498+
yq write -i $(TMP_CR_FILE) spec.keyRingConfigs[1].name $(TEST_SECRET2)
499+
@echo setup signer policy
500+
kubectl apply -f $(TMP_CR_FILE) -n $(ISHIELD_OP_NS)
501+
481502
.PHONY: create-private-registry
482503

483504
create-private-registry:

demo/quick-start/demo.sh

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -73,19 +73,9 @@ echo
7373
NO_WAIT=true
7474
p "Now, we are ready to install IntegrityShield. Please enter."
7575
read
76-
pe "make install-operator"
76+
pe "make setup-demo DEMO_ISHIELD_OP_IMAGE_NAME=${ISHIELD_OPERATOR_IMAGE_NAME_AND_VERSION} DEMO_ISHIELD_SERVER_IMAGE_NAME=${ISHIELD_SERVER_IMAGE_NAME_AND_VERSION} DEMO_ISHIELD_LOGGING_IMAGE_NAME=${ISHIELD_LOGGING_IMAGE_NAME_AND_VERSION}"
7777
echo
78-
echo "===== Integrtity Shield operator is being deployed in cluster. ====="
79-
echo
80-
echo "Then, we set up IntegrityShield custome resource (CR)."
81-
make setup-tmp-cr
82-
echo
83-
echo "===== Integrity Shield CR is set up. ====="
84-
echo
85-
echo "After setting up Integrity Shield CR, Let's now deploy Integrity Shield CR in the cluster."
86-
make create-cr
87-
echo
88-
echo "===== Integrity Shield CR is created in cluster. ====="
78+
echo "===== Integrtity Shield operator is being deployed and IntegrityShield custome resource (CR) is created in cluster. ====="
8979
echo
9080
NO_WAIT=false
9181

0 commit comments

Comments
 (0)