...
kubectl -n argocd set env deployment/argocd-repo-server \
HTTP_PROXY=http://your.proxy.address:port \
HTTPS_PROXY=http://your.proxy.address:port \
NO_PROXY=localhost,127.0.0.1,.cluster.local,.svc,yourcluster.local
6 Install
...
NFS storage class
Create app file called nfs_app.yaml
| Code Block |
|---|
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: nfs-subdir-external-provisioner
namespace: argocd # namespace dove gira Argo CD
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
project: default
source:
repoURL: https://kubernetes-sigs.github.io/nfs-subdir-external-provisioner/
chart: nfs-subdir-external-provisioner
targetRevision: 4.0.18
helm:
values: |
nfs:
server: atlasdisk19.lnf.infn.it
path: /St-Dell3800-A-A13Vd0
storageClass:
name: nfs-atlas |
...
The backend services install:
- kafka
- mongodb
- elasticsearch
At the moment serve all the beamlines of the cluster. These services can be also installed in other ways and/or pre-esistent.
A manifest like the following must be prepared, paying attentio to specify domain, loadBalancerIPs.
Prepare a manifest
| Code Block | ||||
|---|---|---|---|---|
| ||||
apiVersion: argoproj.io/v1alpha1 kind: Application metadata: name: epik8s-backend namespace: argocd spec: project: default source: repoURL: 'https://baltig.infn.it/epics-containers/epik8-backend.git' path: . targetRevision: HEAD helm: values: | namespaceaccessModes: backendReadWriteMany destination: server: https://kubernetes.default.svc namespace: nfs-provisioner domainsyncPolicy: "da" automated: ingressClassNameprune: "ngnix"true selfHeal: true kafkasyncOptions: - CreateNamespace=true |
Apply:
| Code Block | ||||
|---|---|---|---|---|
| ||||
kubectl apply -f nfs_app.yaml |
Test SC (Storage Class):
| Code Block |
|---|
apiVersion: externalAccessv1 kind: PersistentVolumeClaim metadata: name: nfs-test-pvc enablednamespace: true default spec: serviceaccessModes: - ReadWriteMany type: LoadBalancerresources: requests: storage: 1Gi storageClassName: nfs-atlas --- apiVersion: loadBalancerIPsv1 kind: Pod metadata: name: nfs-test-pod namespace: default spec: containers: - name: test - 10.10.6.247 image: busybox:1.36 command: ["/bin/sh", "-c", ports:"sleep 3600"] volumeMounts: - externalname: 9092nfs-storage destination: server: 'https://kubernetes.default.svc' namespacemountPath: backend/mnt/nfs syncPolicyvolumes: automated: - prunename: truenfs-storage # Optional: Automatically remove resourcespersistentVolumeClaim: not specified in Helm chart selfHeal: true syncOptions: - CreateNamespace=true - Prune=true |
Apply:
| Code Block | ||||
|---|---|---|---|---|
| ||||
kubectl apply -f epik8s-backend.yaml |
7 Install NFS storage class
Create app file called nfs_app.yaml
claimName: nfs-test-pvc |
Apply:
| Code Block | ||||
|---|---|---|---|---|
| ||||
kubectl apply -f pod_nfs.yaml |
Test nfs inside pod:
| Code Block | ||||
|---|---|---|---|---|
| ||||
kubectl exec -it nfs-test-pod -- sh
cd /mnt/nfs
touch prova.txt
echo "ciao" > prova.txt
cat prova.txt |
7 Install EPIK8S backend services (optional)
The backend services install:
- kafka
- mongodb
- elasticsearch
At the moment serve all the beamlines of the cluster. These services can be also installed in other ways and/or pre-esistent.
A manifest like the following must be prepared, paying attentio to specify domain, loadBalancerIPs.
Prepare a manifest
| Code Block | ||||
|---|---|---|---|---|
| ||||
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: epik8s-backend
namespace: argocd | ||||
| Code Block | ||||
apiVersion: argoproj.io/v1alpha1 kind: Application metadata: name: nfs-subdir-external-provisioner namespace: argocd # namespace dove gira Argo CD finalizers: - resources-finalizer.argocd.argoproj.io spec: project: default source: repoURL: 'https://kubernetes-sigsbaltig.githubinfn.ioit/nfsepics-subdir-external-provisioner/containers/epik8-backend.git' chartpath: nfs-subdir-external-provisioner. targetRevision: 4.0.18HEAD helm: values: | nfsnamespace: backend serverdomain: atlasdisk19.lnf.infn.it"da" pathingressClassName: /St-Dell3800-A-A13Vd0 storageClass:"ngnix" namekafka: nfs-atlas accessModes: ReadWriteMany destinationexternalAccess: server: https://kubernetes.default.svc namespaceenabled: nfs-provisionertrue syncPolicy: automated: prune: true selfHealservice: true syncOptions: - CreateNamespace=true |
Apply:
| Code Block | ||||
|---|---|---|---|---|
| ||||
kubectl apply -f nfs_app.yaml |
Test SC (Storage Class):
| Code Block |
|---|
apiVersion: v1 kind: PersistentVolumeClaim metadata: name: nfs-test-pvc namespace: default spec: accessModes: type: LoadBalancer - ReadWriteMany resourcesloadBalancerIPs: requests: storage: 1Gi storageClassName: nfs-atlas --- apiVersion: v1 kind: Pod metadata: name: nfs-test-pod namespace: default spec: containers: - 10.10.6.247 ports: - name: test imageexternal: busybox:1.369092 destination: commandserver: ["'https:/bin/sh", "-c", "sleep 3600"] /kubernetes.default.svc' namespace: backend syncPolicy: volumeMountsautomated: prune: true - # nameOptional: nfs-storage Automatically remove resources not specified in Helm chart mountPath: /mnt/nfs volumesselfHeal: true - name: nfs-storagesyncOptions: persistentVolumeClaim: - CreateNamespace=true claimName: nfs-test-pvc- Prune=true |
Apply:
| Code Block | ||||
|---|---|---|---|---|
| ||||
kubectl apply -f pod_nfsepik8s-backend.yaml |
Test nfs inside pod:
| Code Block | ||||||
|---|---|---|---|---|---|---|
| kubectl exec -it nfs-test-pod -- sh
cd /mnt/nfs
touch prova.txt
echo "ciao" > prova.txt
cat prova.txt||||||
8 Install EPIK8S beamline
...