diff --git a/2023-07-20-acm-submariner-stream/README.org b/2023-07-20-acm-submariner-stream/README.org new file mode 100644 index 0000000..8b105ed --- /dev/null +++ b/2023-07-20-acm-submariner-stream/README.org @@ -0,0 +1,10 @@ +#+TITLE: Progressive cloud migrations with Red Hat Advanced Cluster Management +#+AUTHOR: James Blair +#+DATE: <2023-07-20 Thu 11:00> + + +This is a short demo I gave during an episode of the "APAC Hybrid Cloud Kopi Hour (E05) | Managing Kubernetes Clusters in a Hybrid and Multi-Cloud World" live stream. + +You can watch the full stream below: + +[[./images/stream.png]] diff --git a/2023-07-20-acm-submariner-stream/guestbook/acm-resources/application.yaml b/2023-07-20-acm-submariner-stream/guestbook/acm-resources/application.yaml new file mode 100644 index 0000000..ffe29c2 --- /dev/null +++ b/2023-07-20-acm-submariner-stream/guestbook/acm-resources/application.yaml @@ -0,0 +1,16 @@ +--- +apiVersion: app.k8s.io/v1beta1 +kind: Application +metadata: + name: guestbook + namespace: guestbook +spec: + selector: + matchExpressions: + - key: app + operator: In + values: + - guestbook-app + componentKinds: + - group: apps.open-cluster-management.io + kind: Subscription diff --git a/2023-07-20-acm-submariner-stream/guestbook/acm-resources/channel.yaml b/2023-07-20-acm-submariner-stream/guestbook/acm-resources/channel.yaml new file mode 100644 index 0000000..c6cd664 --- /dev/null +++ b/2023-07-20-acm-submariner-stream/guestbook/acm-resources/channel.yaml @@ -0,0 +1,9 @@ +--- +apiVersion: apps.open-cluster-management.io/v1 +kind: Channel +metadata: + name: guestbook-app-latest + namespace: guestbook +spec: + type: GitHub + pathname: https://github.com/jmhbnz/acm-demo-app.git diff --git a/2023-07-20-acm-submariner-stream/guestbook/acm-resources/kustomization.yaml b/2023-07-20-acm-submariner-stream/guestbook/acm-resources/kustomization.yaml new file mode 100644 index 0000000..004ee24 --- /dev/null +++ b/2023-07-20-acm-submariner-stream/guestbook/acm-resources/kustomization.yaml @@ -0,0 +1,6 @@ +resources: +- namespace.yaml +- channel.yaml +- placementrule.yaml +- subscription.yaml +- application.yaml diff --git a/2023-07-20-acm-submariner-stream/guestbook/acm-resources/namespace.yaml b/2023-07-20-acm-submariner-stream/guestbook/acm-resources/namespace.yaml new file mode 100644 index 0000000..8e34ae9 --- /dev/null +++ b/2023-07-20-acm-submariner-stream/guestbook/acm-resources/namespace.yaml @@ -0,0 +1,5 @@ +--- +apiVersion: v1 +kind: Namespace +metadata: + name: guestbook diff --git a/2023-07-20-acm-submariner-stream/guestbook/acm-resources/placementrule.yaml b/2023-07-20-acm-submariner-stream/guestbook/acm-resources/placementrule.yaml new file mode 100644 index 0000000..8fcf8da --- /dev/null +++ b/2023-07-20-acm-submariner-stream/guestbook/acm-resources/placementrule.yaml @@ -0,0 +1,16 @@ + +apiVersion: apps.open-cluster-management.io/v1 +kind: PlacementRule +metadata: + name: guestbook-pr + namespace: guestbook + labels: + app: guestbook-app +spec: + clusterReplicas: 2 + clusterConditions: + - type: ManagedClusterConditionAvailable + status: "True" + clusterSelector: + matchLabels: + name: dev-a \ No newline at end of file diff --git a/2023-07-20-acm-submariner-stream/guestbook/acm-resources/subscription.yaml b/2023-07-20-acm-submariner-stream/guestbook/acm-resources/subscription.yaml new file mode 100644 index 0000000..8fc155a --- /dev/null +++ b/2023-07-20-acm-submariner-stream/guestbook/acm-resources/subscription.yaml @@ -0,0 +1,16 @@ +apiVersion: apps.open-cluster-management.io/v1 +kind: Subscription +metadata: + name: guestbook-app + namespace: guestbook + labels: + app: guestbook-app + annotations: + apps.open-cluster-management.io/git-path: guestbook-app/guestbook + apps.open-cluster-management.io/git-branch: main +spec: + channel: guestbook/guestbook-app-latest + placement: + placementRef: + kind: PlacementRule + name: guestbook-pr diff --git a/2023-07-20-acm-submariner-stream/guestbook/guestbook/deployment.yaml b/2023-07-20-acm-submariner-stream/guestbook/guestbook/deployment.yaml new file mode 100644 index 0000000..44bcc55 --- /dev/null +++ b/2023-07-20-acm-submariner-stream/guestbook/guestbook/deployment.yaml @@ -0,0 +1,35 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: frontend + namespace: guestbook +spec: + selector: + matchLabels: + app: guestbook + tier: frontend + replicas: 3 + template: + metadata: + labels: + app: guestbook + tier: frontend + spec: + containers: + - name: php-redis + image: docker.io/ibmcom/guestbook:v1 + resources: + requests: + cpu: 100m + memory: 100Mi + env: + - name: GET_HOSTS_FROM + value: env + - name: REDIS_MASTER_SERVICE_HOST + value: redis-master.guestbook.svc.clusterset.local + - name: REDIS_MASTER_SERVICE_PORT + value: "6379" + - name: REDIS_MASTER_SERVICE_PASSWORD + value: test + ports: + - containerPort: 3000 diff --git a/2023-07-20-acm-submariner-stream/guestbook/guestbook/route.yaml b/2023-07-20-acm-submariner-stream/guestbook/guestbook/route.yaml new file mode 100644 index 0000000..f4cccad --- /dev/null +++ b/2023-07-20-acm-submariner-stream/guestbook/guestbook/route.yaml @@ -0,0 +1,12 @@ +apiVersion: route.openshift.io/v1 +kind: Route +metadata: + name: guestbook + namespace: guestbook +spec: + port: + targetPort: 3000 + to: + kind: Service + name: frontend + weight: 100 diff --git a/2023-07-20-acm-submariner-stream/guestbook/guestbook/service.yaml b/2023-07-20-acm-submariner-stream/guestbook/guestbook/service.yaml new file mode 100644 index 0000000..05e63e1 --- /dev/null +++ b/2023-07-20-acm-submariner-stream/guestbook/guestbook/service.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + name: frontend + namespace: guestbook + labels: + app: guestbook + tier: frontend +spec: + ports: + - port: 3000 + selector: + app: guestbook + tier: frontend \ No newline at end of file diff --git a/2023-07-20-acm-submariner-stream/images/stream.png b/2023-07-20-acm-submariner-stream/images/stream.png new file mode 100644 index 0000000..1e9f515 Binary files /dev/null and b/2023-07-20-acm-submariner-stream/images/stream.png differ diff --git a/2023-07-20-acm-submariner-stream/redis/acm-resources/application.yaml b/2023-07-20-acm-submariner-stream/redis/acm-resources/application.yaml new file mode 100644 index 0000000..2289baa --- /dev/null +++ b/2023-07-20-acm-submariner-stream/redis/acm-resources/application.yaml @@ -0,0 +1,17 @@ +--- +apiVersion: app.k8s.io/v1beta1 +kind: Application +metadata: + namespace: guestbook + name: redis-master-app +spec: + componentKinds: + - group: apps.open-cluster-management.io + kind: Subscription + descriptor: {} + selector: + matchExpressions: + - key: app + operator: In + values: + - redis-master-app diff --git a/2023-07-20-acm-submariner-stream/redis/acm-resources/channel.yaml b/2023-07-20-acm-submariner-stream/redis/acm-resources/channel.yaml new file mode 100644 index 0000000..5ed7ffc --- /dev/null +++ b/2023-07-20-acm-submariner-stream/redis/acm-resources/channel.yaml @@ -0,0 +1,9 @@ +--- +apiVersion: apps.open-cluster-management.io/v1 +kind: Channel +metadata: + name: redis-master-app-latest + namespace: guestbook +spec: + type: GitHub + pathname: https://github.com/jmhbnz/acm-demo-app.git diff --git a/2023-07-20-acm-submariner-stream/redis/acm-resources/kustomization.yaml b/2023-07-20-acm-submariner-stream/redis/acm-resources/kustomization.yaml new file mode 100644 index 0000000..8f362c1 --- /dev/null +++ b/2023-07-20-acm-submariner-stream/redis/acm-resources/kustomization.yaml @@ -0,0 +1,5 @@ +resources: +- channel.yaml +- placementrule.yaml +- subscription.yaml +- application.yaml diff --git a/2023-07-20-acm-submariner-stream/redis/acm-resources/placementrule.yaml b/2023-07-20-acm-submariner-stream/redis/acm-resources/placementrule.yaml new file mode 100644 index 0000000..f31074d --- /dev/null +++ b/2023-07-20-acm-submariner-stream/redis/acm-resources/placementrule.yaml @@ -0,0 +1,13 @@ +--- +apiVersion: apps.open-cluster-management.io/v1 +kind: PlacementRule +metadata: + namespace: guestbook + name: redis-master-app-placement-1 + labels: + app: redis-master-app +spec: + clusterSelector: + matchLabels: + name: local-cluster + diff --git a/2023-07-20-acm-submariner-stream/redis/acm-resources/subscription.yaml b/2023-07-20-acm-submariner-stream/redis/acm-resources/subscription.yaml new file mode 100644 index 0000000..5a6706d --- /dev/null +++ b/2023-07-20-acm-submariner-stream/redis/acm-resources/subscription.yaml @@ -0,0 +1,17 @@ +--- +apiVersion: apps.open-cluster-management.io/v1 +kind: Subscription +metadata: + namespace: guestbook + name: redis-master-app-subscription-1 + annotations: + apps.open-cluster-management.io/git-branch: main + apps.open-cluster-management.io/git-path: redis-master-app/redis-master + labels: + app: redis-master-app +spec: + channel: guestbook/redis-master-app-latest + placement: + placementRef: + name: redis-master-app-placement-1 + kind: PlacementRule diff --git a/2023-07-20-acm-submariner-stream/redis/redis-master/deployment.yaml b/2023-07-20-acm-submariner-stream/redis/redis-master/deployment.yaml new file mode 100644 index 0000000..a3e63e1 --- /dev/null +++ b/2023-07-20-acm-submariner-stream/redis/redis-master/deployment.yaml @@ -0,0 +1,28 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: redis-master + namespace: guestbook +spec: + selector: + matchLabels: + app: redis + role: master + tier: backend + replicas: 1 + template: + metadata: + labels: + app: redis + role: master + tier: backend + spec: + containers: + - name: master + image: k8s.gcr.io/redis:e2e + resources: + requests: + cpu: 100m + memory: 100Mi + ports: + - containerPort: 6379 \ No newline at end of file diff --git a/2023-07-20-acm-submariner-stream/redis/redis-master/service.yaml b/2023-07-20-acm-submariner-stream/redis/redis-master/service.yaml new file mode 100644 index 0000000..6e685de --- /dev/null +++ b/2023-07-20-acm-submariner-stream/redis/redis-master/service.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +kind: Service +metadata: + name: redis-master + namespace: guestbook + labels: + app: redis + role: master + tier: backend +spec: + ports: + - port: 6379 + targetPort: 6379 + selector: + app: redis + role: master + tier: backend \ No newline at end of file diff --git a/2023-07-20-acm-submariner-stream/redis/redis-master/serviceexport.yaml b/2023-07-20-acm-submariner-stream/redis/redis-master/serviceexport.yaml new file mode 100644 index 0000000..61f97c0 --- /dev/null +++ b/2023-07-20-acm-submariner-stream/redis/redis-master/serviceexport.yaml @@ -0,0 +1,5 @@ +apiVersion: multicluster.x-k8s.io/v1alpha1 +kind: ServiceExport +metadata: + name: redis-master + namespace: guestbook \ No newline at end of file diff --git a/README.org b/README.org index ac8276d..bdc3ba4 100644 --- a/README.org +++ b/README.org @@ -2,7 +2,7 @@ #+AUTHOR: James Blair #+DATE: <2023-02-03 Fri 10:30> -Over the last few years I've given many talks and demos at community events, it's one of the things I really love to do. To support these talks and demo's I've historically created separate repositories for each which ends up creating a bit of clutter in github so moving forward I will be using this monorepo to keep things together. +Over the last few years I've given many talks and demos at community events, it's one of the things I really love to do. To support these talks and demo's I've historically created separate repositories for each which ends up creating a bit of unmaintained clutter in github so moving forward I will be using this monorepo to keep things together. Additionally I want to keep and track a bit more of an overview for the talks I've given with things like links to recordings so this repository will hopefully make it easier for me to do that. @@ -17,4 +17,5 @@ Whether you attended one of my talks or just stumbled upon this repository, I ho | 01-02-2023 | Wellington | OpenShift Meetup, Cloud Native Landscape Updates | [[./2023-02-01-openshift-meetup/][link]] | | 22-02-2023 | Wellington | CNCF Meetup, Connecting clouds the easy way, introducing Skupper | [[./2023-02-22-wgtn-cncf-meetup][link]] | | 15-03-2023 | Wellington | Ansible Meetup, Lightening Talk, ChatOps in Jira via Ansible | [[./2023-03-15-wgtn-ansible-meetup][link]] | -| 15-06-2023 | Wellington | Workshop, Chaos Engineering | | +| 15-06-2023 | Wellington | Workshop, Chaos Engineering | [[2023-06-15-chaos-engineering-workshop][link]] | +| 20-07-2023 | Remote | APAC Hybrid Cloud Kopi Hour E05, RHACM + Submariner | [[./2023-07-20-acm-submariner-stream][link]] |