|
| 1 | +# Custom cluster testing |
| 2 | + |
| 3 | +These scenarios require the gcloud cluster to be already set up, see below if your cluster is not set up yet or see if there is already a cluster in place with istio installed. |
| 4 | + |
| 5 | +## Once your cluster is set up |
| 6 | + |
| 7 | +Option 1: Run script on public tag |
| 8 | + |
| 9 | +`exer_image.py [js ceramic tag]` |
| 10 | + |
| 11 | +Option 2: Run the workflow manually |
| 12 | + |
| 13 | +``` |
| 14 | +kc config set-context --current --namespace=keramik |
| 15 | +
|
| 16 | +# edit the network-with-cas.yaml to specify the desired image |
| 17 | +# edit the meta tag accordingly |
| 18 | +kc apply -f network-with-cas.yaml # defines the ceramic version |
| 19 | +
|
| 20 | +kc config set-context --current --namespace=keramic-[your label] |
| 21 | +
|
| 22 | +kc edit statefulsets cas |
| 23 | +
|
| 24 | +####### add |
| 25 | + - name: SQS_QUEUE_URL |
| 26 | + value: "" |
| 27 | + - name: MERKLE_CAR_STORAGE_MODE |
| 28 | + value: disabled |
| 29 | +########### |
| 30 | +
|
| 31 | +kc label namespace keramik-[your label] istio-injection=enabled |
| 32 | +
|
| 33 | +kc apply -f delay-cas.yaml |
| 34 | +
|
| 35 | +# edit write-only.yaml to match the namespace |
| 36 | +kc apply -f write-only.yaml # runs the simulation |
| 37 | +
|
| 38 | +``` |
| 39 | + |
| 40 | +To see the results, go to https://us3.datadoghq.com/apm/home |
| 41 | + |
| 42 | +Datadog -> APM-> (pick name) -> click -> service overview |
| 43 | + |
| 44 | + |
| 45 | +## But first, one time, set up your testing cluster |
| 46 | + |
| 47 | +``` |
| 48 | +gcloud config set project box-benchmarking-ipfs-testing |
| 49 | +
|
| 50 | +gcloud config set compute/zone us-central1-c |
| 51 | +
|
| 52 | +gcloud container clusters create [your cluster] |
| 53 | +
|
| 54 | +gcloud container node-pools create e2-standard-4 --cluster [your cluster] \ |
| 55 | + --machine-type=e2-standard-4 --num-nodes=3 |
| 56 | +
|
| 57 | +# one time get credentials into kubectl |
| 58 | +gcloud container clusters get-credentials [your cluster] |
| 59 | +
|
| 60 | +# if not already installed, see https://istio.io/ |
| 61 | +# curl -L https://istio.io/downloadIstio | sh - |
| 62 | +
|
| 63 | +# install istio virtual network overlay |
| 64 | +istioctl install --set profile=demo |
| 65 | +
|
| 66 | +# set up namespace for datadog |
| 67 | +kubectl create ns datadog-operator |
| 68 | +helm install -n datadog-operator datadog-operator datadog/datadog-operator |
| 69 | +# add the creds to the datadog namespace |
| 70 | +kubectl create secret generic datadog-secret --from-literal=api-key=<YOUR APIP-KEY> \ |
| 71 | + --from-literal=app-key=<YOUR APP-KEY> -n datadog-operator |
| 72 | +
|
| 73 | +kubectl apply -f datadogAgent.yaml -n datadog-operator |
| 74 | +
|
| 75 | +# set up keramik |
| 76 | +kubectl create ns keramik |
| 77 | +cargo run --bin crdgen | kubectl create -f - |
| 78 | +kubectl apply -k k8s/operator/ |
| 79 | +
|
| 80 | +``` |
0 commit comments