From 6540f75a4631b6f12e79b666706a5722ebea5b3f Mon Sep 17 00:00:00 2001 From: Giles Knap Date: Tue, 2 Jul 2024 09:20:12 +0100 Subject: [PATCH] update readme --- README.md | 10 ++++++- argo/.helmignore | 21 -------------- argo/Chart.yaml | 23 --------------- argo/templates/NOTES.txt | 19 ------------- argo/templates/_helpers.tpl | 32 --------------------- argo/templates/deployment.yaml | 52 ---------------------------------- argo/templates/service.yaml | 19 ------------- argo/values-production.yaml | 2 -- argo/values.yaml | 47 ------------------------------ compose.yaml | 2 +- 10 files changed, 10 insertions(+), 217 deletions(-) delete mode 100644 argo/.helmignore delete mode 100644 argo/Chart.yaml delete mode 100644 argo/templates/NOTES.txt delete mode 100644 argo/templates/_helpers.tpl delete mode 100644 argo/templates/deployment.yaml delete mode 100644 argo/templates/service.yaml delete mode 100644 argo/values-production.yaml delete mode 100644 argo/values.yaml diff --git a/README.md b/README.md index 0cb8c22..0deec4c 100644 --- a/README.md +++ b/README.md @@ -25,9 +25,17 @@ mkdir -p ~/.local/share/bash-completion/completions podman completion bash > ~/.local/share/bash-completion/completions/podman ``` +Some users who have set up podman sockets in the past may get errors with `module load docker-compose`. If you do then do the following and then re-run it. +```bash +/dls_sw/apps/setup-podman/setup.sh +sed -i ~/.config/containers/containers.conf -e '/label=false/d' -e '/^\[containers\]$/a label=false' +``` + ### Local Developer Environment To launch a development environment on a workstation, including phoebus: ```bash +git clone git@github.com:gilesknap/bl01t.git +cd bl01t alias ec='podman compose' # just for convenience export COMPOSE_PROFILES=develop UIDGID=0:0 EPICS_CA_ADDR_LIST=127.0.0.1 ec up -d @@ -50,7 +58,7 @@ ec exec bl01t-di-cam-01 bash # delete a service (deletes the container) ec down bl01t-di-cam-01 # create and launch a single service (plus its dependencies) -ec up bl01tt-di-cam-01 -d +ec up bl01t-di-cam-01 -d ``` ### Deploy To Beamline Servers diff --git a/argo/.helmignore b/argo/.helmignore deleted file mode 100644 index f0c1319..0000000 --- a/argo/.helmignore +++ /dev/null @@ -1,21 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*~ -# Various IDEs -.project -.idea/ -*.tmproj diff --git a/argo/Chart.yaml b/argo/Chart.yaml deleted file mode 100644 index 6fac831..0000000 --- a/argo/Chart.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: v2 -name: helm-guestbook -description: A Helm chart for Kubernetes - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. -type: application - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -# Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.0 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. Versions are not expected to -# follow Semantic Versioning. They should reflect the version the application is using. -appVersion: "1.0" diff --git a/argo/templates/NOTES.txt b/argo/templates/NOTES.txt deleted file mode 100644 index 37a1485..0000000 --- a/argo/templates/NOTES.txt +++ /dev/null @@ -1,19 +0,0 @@ -1. Get the application URL by running these commands: -{{- if .Values.ingress.enabled }} -{{- range .Values.ingress.hosts }} - http{{ if $.Values.ingress.tls }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }} -{{- end }} -{{- else if contains "NodePort" .Values.service.type }} - export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "helm-guestbook.fullname" . }}) - export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") - echo http://$NODE_IP:$NODE_PORT -{{- else if contains "LoadBalancer" .Values.service.type }} - NOTE: It may take a few minutes for the LoadBalancer IP to be available. - You can watch the status of by running 'kubectl get svc -w {{ template "helm-guestbook.fullname" . }}' - export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "helm-guestbook.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') - echo http://$SERVICE_IP:{{ .Values.service.port }} -{{- else if contains "ClusterIP" .Values.service.type }} - export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "helm-guestbook.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") - echo "Visit http://127.0.0.1:8080 to use your application" - kubectl port-forward $POD_NAME 8080:80 -{{- end }} diff --git a/argo/templates/_helpers.tpl b/argo/templates/_helpers.tpl deleted file mode 100644 index 20f5d8e..0000000 --- a/argo/templates/_helpers.tpl +++ /dev/null @@ -1,32 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "helm-guestbook.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "helm-guestbook.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "helm-guestbook.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} diff --git a/argo/templates/deployment.yaml b/argo/templates/deployment.yaml deleted file mode 100644 index ab4b098..0000000 --- a/argo/templates/deployment.yaml +++ /dev/null @@ -1,52 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "helm-guestbook.fullname" . }} - labels: - app: {{ template "helm-guestbook.name" . }} - chart: {{ template "helm-guestbook.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - replicas: {{ .Values.replicaCount }} - revisionHistoryLimit: 3 - selector: - matchLabels: - app: {{ template "helm-guestbook.name" . }} - release: {{ .Release.Name }} - template: - metadata: - labels: - app: {{ template "helm-guestbook.name" . }} - release: {{ .Release.Name }} - spec: - containers: - - name: {{ .Chart.Name }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - ports: - - name: http - containerPort: {{ .Values.containerPort }} - protocol: TCP - livenessProbe: - httpGet: - path: / - port: http - readinessProbe: - httpGet: - path: / - port: http - resources: -{{ toYaml .Values.resources | indent 12 }} - {{- with .Values.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} diff --git a/argo/templates/service.yaml b/argo/templates/service.yaml deleted file mode 100644 index b7aab0b..0000000 --- a/argo/templates/service.yaml +++ /dev/null @@ -1,19 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ template "helm-guestbook.fullname" . }} - labels: - app: {{ template "helm-guestbook.name" . }} - chart: {{ template "helm-guestbook.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.port }} - targetPort: http - protocol: TCP - name: http - selector: - app: {{ template "helm-guestbook.name" . }} - release: {{ .Release.Name }} diff --git a/argo/values-production.yaml b/argo/values-production.yaml deleted file mode 100644 index 42838b7..0000000 --- a/argo/values-production.yaml +++ /dev/null @@ -1,2 +0,0 @@ -service: - type: LoadBalancer diff --git a/argo/values.yaml b/argo/values.yaml deleted file mode 100644 index 642921f..0000000 --- a/argo/values.yaml +++ /dev/null @@ -1,47 +0,0 @@ -# Default values for helm-guestbook. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -replicaCount: 1 - -image: - repository: gcr.io/heptio-images/ks-guestbook-demo - tag: 0.1 - pullPolicy: IfNotPresent - -containerPort: 80 - -service: - type: ClusterIP - port: 80 - -ingress: - enabled: false - annotations: {} - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: "true" - path: / - hosts: - - chart-example.local - tls: [] - # - secretName: chart-example-tls - # hosts: - # - chart-example.local - -resources: {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi - -nodeSelector: {} - -tolerations: [] - -affinity: {} diff --git a/compose.yaml b/compose.yaml index 8edfcd9..1670fdc 100644 --- a/compose.yaml +++ b/compose.yaml @@ -16,8 +16,8 @@ include: - include/init.yml # all profiles - - services/bl01t-di-cam-01/compose.yml - services/bl01t-ea-test-01/compose.yml + - services/bl01t-di-cam-01/compose.yml # develop profile only - services/phoebus/compose.yml