Skip to content

Instantly share code, notes, and snippets.

View philipz's full-sized avatar

philipz philipz

View GitHub Profile
@philipz
philipz / readme.md
Created August 29, 2024 14:13
Camunda Run with cockpit-plugins

Refer: datakurre/camunda-cockpit-plugins#16

docker buildx build --push --platform linux/arm64,linux/amd64,linux/amd64/v2 -t philipz/camunda-cockpit-plugins:7.21.0 .

FROM camunda/camunda-bpm-platform:run-7.21.0

USER root
RUN apk add --no-cache git zip
USER camunda
@philipz
philipz / postgres.yaml
Last active May 22, 2024 15:50
Camunda 7 Helm install
apiVersion: apps/v1
kind: Deployment
metadata:
name: postgres-deployment
namespace: default
spec:
replicas: 1
selector:
matchLabels:
app: postgres
@philipz
philipz / readme.md
Created January 18, 2024 01:50
Kind config for ingress and volume
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
  extraMounts:
  - hostPath: /Users/YOURNAME/lab/kind
    containerPath: /home/kind
  extraPortMappings:
 ## expose port 31080 of the node to port 80 on the host
@philipz
philipz / gist:631863e64c1b028a6b80ae4facfde850
Created October 22, 2023 09:26
Render Helm Chart Templates
helm template <CHART_NAME> <REPO_NAME>/<PATH_TO_CHART>
- example -
helm template nginx-ingress nginx/nginx-ingress
helm template validator-1 ./charts/goquorum-node --namespace quorum --values ./values/validator.yml --debug > test.yaml
@philipz
philipz / readme.md
Created October 17, 2023 10:22
kubectl cp command terminates with exit code 126?

copy a file from local filesystem into a container:

cat [local file path] | kubectl exec -i -n [namespace] [pod] -c [container] "--" sh -c "cat > [remote file path]"

ex:

cat keycloak-benchmark-dataset-0.10-SNAPSHOT.jar | k exec -i pods/keycloak-65f866dc7b-2kpn5 "--" sh -c "cat > /opt/keycloak/providers/keycloak-benchmark-dataset-0.10-SNAPSHOT.jar"
@philipz
philipz / README.md
Last active June 7, 2022 14:00
擴充LVM磁碟空間步驟
  1. VM increasing the size of Disk.
  2. sudo fdisk -l 確認是否已經DISK空間是否擴增。
  3. sudo fdisk /dev/sda

[root@localhost ~]# fdisk /dev/sda Welcome to fdisk (util-linux 2.23.2).

Changes will remain in memory only, until you decide to write them. Be careful before using the write command.

@philipz
philipz / nginx-tuning.md
Created September 27, 2021 01:23 — forked from denji/nginx-tuning.md
NGINX tuning for best performance

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.

@philipz
philipz / nodes.md
Created August 9, 2021 14:37
Documenting Software Architectures Views and Beyond

Seven Rules for Sound Documentation

  1. Write Documentation from the Reader’s Point of View
  2. Avoid Unnecessary Repetition
  3. Avoid Ambiguity 3.a Explain Your Notation
  4. Use a Standard Organization
  5. Record Rationale
  6. Keep Documentation Current but Not Too Current
  7. Review Documentation for Fitness of Purpose
@philipz
philipz / readme.md
Created June 5, 2021 13:11
Deploy to Kubernetes in Google Cloud: Challenge Lab

Task 1: Create a Docker image and store the Dockerfile

source <(gsutil cat gs://cloud-training/gsp318/marking/setup_marking.sh)
gcloud source repos clone valkyrie-app
cd valkyrie-app

cat > Dockerfile <<EOF
FROM golang:1.10
WORKDIR /go/src/app
COPY source .