Skip to content

Commit

Permalink
Merge pull request #230 from IBM/fix/demo-magic
Browse files Browse the repository at this point in the history
Fix/demo magic
  • Loading branch information
yuji-watanabe-jp authored Jan 5, 2021
2 parents ec33fe2 + 3885f74 commit 49cee7d
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 12 deletions.
21 changes: 21 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,27 @@ publish:
$(ISHIELD_REPO_ROOT)/build/publish_images.sh
$(ISHIELD_REPO_ROOT)/build/publish_bundle_ocm.sh

setup-demo:
@echo
@echo setting image
cp $(SHIELD_OP_DIR)config/manager/kustomization.yaml $(TMP_DIR)kustomization.yaml #copy original file to tmp dir.
cd $(SHIELD_OP_DIR)config/manager && kustomize edit set image controller=$(DEMO_ISHIELD_OP_IMAGE_NAME)
@echo installing operator
kustomize build $(SHIELD_OP_DIR)config/default | kubectl apply --validate=false -f -
cp $(TMP_DIR)kustomization.yaml $(SHIELD_OP_DIR)config/manager/kustomization.yaml
@echo prepare cr
@echo copy cr into tmp dir
cp $(SHIELD_OP_DIR)config/samples/apis_v1alpha1_integrityshield_local.yaml $(TMP_CR_FILE)
@echo insert image
yq write -i $(TMP_CR_FILE) spec.logger.image $(DEMO_ISHIELD_LOGGING_IMAGE_NAME)
yq write -i $(TMP_CR_FILE) spec.logger.imagePullPolicy Always
yq write -i $(TMP_CR_FILE) spec.server.image $(DEMO_ISHIELD_SERVER_IMAGE_NAME)
yq write -i $(TMP_CR_FILE) spec.server.imagePullPolicy Always
@echo setup keyring configs
yq write -i $(TMP_CR_FILE) spec.keyRingConfigs[1].name $(TEST_SECRET2)
@echo setup signer policy
kubectl apply -f $(TMP_CR_FILE) -n $(ISHIELD_OP_NS)

.PHONY: create-private-registry

create-private-registry:
Expand Down
14 changes: 2 additions & 12 deletions demo/quick-start/demo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,19 +73,9 @@ echo
NO_WAIT=true
p "Now, we are ready to install IntegrityShield. Please enter."
read
pe "make install-operator"
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}"
echo
echo "===== Integrtity Shield operator is being deployed in cluster. ====="
echo
echo "Then, we set up IntegrityShield custome resource (CR)."
make setup-tmp-cr
echo
echo "===== Integrity Shield CR is set up. ====="
echo
echo "After setting up Integrity Shield CR, Let's now deploy Integrity Shield CR in the cluster."
make create-cr
echo
echo "===== Integrity Shield CR is created in cluster. ====="
echo "===== Integrtity Shield operator is being deployed and IntegrityShield custome resource (CR) is created in cluster. ====="
echo
NO_WAIT=false

Expand Down

0 comments on commit 49cee7d

Please sign in to comment.