Installing ArgoCD - Aridhia-Open-Source/PHEMS_federated_node GitHub Wiki
ArgoCD files
Navigate to the ArgoCD folder and run the installation script
This will:
- add the argoCD helm repository locally (just as listing)
- install the latest argo version with some of our custom configuration
- add the two github repository as available sources when adding a new application.
Once the installation is completed, argo can be accessed by "bridging" a connection:
kubectl port-forward service/argocd-server -n argocd 8000:443
This will allow you to access the UI at localhost:8000
You will need a set of credentials, which are stored in a kubernetes secret
kubectl -n argocd get secret argocd-initial-admin-secret -o json | jq -r '.data | .[] |= @base64d'
Note that this should be used as a temporary password, and should be changed after the first login. More details in the ArgoCD official docs
Add an application
In terms of Argo ecosystem, an application can be interchangeably used as deployment. This can be done in two ways:
- via the CLI using a
.yaml
file - via the UI
Most cases within the Federated Node we will be dealing with an helm chart as an application.
Via the UI
Once logged in, you will be greeted with this screen:
By clicking on Create application
, the following will appear:
- Fill up the form, by setting the
Application Name
to something it can be recognized. - Set the project name to
default
, it should be a dropdown menu. - Set the sync policy to
Manual
if you want to have control when to perform an update, orAutomatic
if you want to install them as they come
This section is mostly autocomplete/dropdown choices
- Set the repository name to the
PHEMS_federated_node
option Revision
in case of a git repository refers to the branch you want to monitor and pull changes from, let's say this is going to bemain
. Deleting the existing field valueHEAD
will prompt with all the available branchesPath
will be updated automatically after theRevision
. Argo will autodetect suitable paths, at this time should bek8s/federated-node
Here we should tell where to install the application
Cluster URL
should be the only available choicehttps://kubernetes.default.svc
.- Namespace should be the base where the application will be installed to. Set it to
default
(no autocomplete here) if no preference.
Here we set the specific helm chart related configuration
in the red-highlighted box the contents of the values.yaml
file should be pasted. These values should be set if they differ from the default ones. For more info, have a look at the deployment instructions
Via the CLI
It would be preferable for the CLI to be installed (The CLI should be installed as part of the argo installation script). This can be verified by running:
argocd version
if succesful something like this should be returned
argocd: v2.13.1+af54ef8
BuildDate: 2024-11-20T16:54:29Z
GitCommit: af54ef8db5adfa77a08d4d05b1318a2198084c22
GitTreeState: clean
GoVersion: go1.22.9
Compiler: gc
Platform: linux/amd64
To add an application you would need a yaml
file representing the app, an example is provided here
Once this file exists with the appropriate contents
argocd app create <application-name> --file <path-to-yaml-file>
Or
kubectl apply -f fn_application.yaml
More details here