Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Helm deployment templates, charts, documentation #179

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

abhishekmaha23
Copy link

Regarding #178

This PR adds an initial version of Helm charts, templates and configuration documentation to the examples folder.

As much as possible, external charts are used - this is tested on a Rancher based Kubernetes setup, and further tests on cloud providers may be useful to test usefulness.

As the project gains more features and stability, this may be connected to a CI/CD pipeline and uploaded to ArtifactHub, so that it becomes easier to use.

Some shortcomings have been identified and bypassed to ensure a working deployable setup, and these are described in the README.md.

@FrankSchnicke
Copy link
Contributor

Thanks a lot for this contribution! I see that you included two plugins for the web ui. Are they included intentionally or is this WIP related to the ticket being discussed in the basyx-application repository?

@abhishekmaha23
Copy link
Author

Good point! I added them as example for deploying multiple UserPlugins, and I should remove the Time-Series Plugin, as it is additional functionality, which probably isn't as relevant to readers.
It's not directly WIP (that is located here)

@abhishekmaha23
Copy link
Author

Reason for making a local copy of the HelloWorldPlugin:

  • It has a minor bug (with a relative import) that makes it not suitable to adding as an external Plugin till fixed (this is fixed in the local file)
  • The mounting of my Kubernetes projected volume of ConfigMap plugin sources to the UserPlugins folder destructively removes the pre-loaded HelloWorldPlugin.vue file already in that folder, and I haven't yet figured out a way to do this non-destructively

@FrankSchnicke
Copy link
Contributor

Thanks for elaborating and adapting the PR. For the aas registry, in templates there is still a aas-environment-ingress.yaml instead of a aas-registry-ingress.yaml - this is most likely just a naming mistake, right?

@abhishekmaha23
Copy link
Author

Yup! It's a naming mistake on my part!
Helm automatically picks up all the files in the templates folder regardless of name, so I missed it.

@abhishekmaha23
Copy link
Author

@FrankSchnicke, I think this PR is ready for the current state of the repository.
I see 2 updates in active development, and will update the PR after I see these merged into main:

  • The RBAC is currently being developed - the merged example is still a bit unclear, and there are 2 open PRs that @mdanish98 is actively building now.
  • AAS GUI is now developing in a PR, and a nice new GUI release seems nearly ready (by @aaronzi).

@FrankSchnicke
Copy link
Contributor

Thanks a lot for the updates! We're taking a detailed look at the Helm Charts right now and will come back with more feedback/questions soon.

@mdanish98
Copy link
Contributor

mdanish98 commented Jan 26, 2024

Hi @abhishekmaha23 ,

Thanks for providing the charts :)

I followed your step by step explanation in Readme, and the service is deployed:

PS C:\Users\danish\eclipse-workspace\Basyx2.0\basyx-java-server-sdk\examples\cloud> helm install -n basyx-v2 basyxv2 -f values.external.yaml -f values.basyx.yaml .
W0126 10:05:00.806280   14704 warnings.go:70] annotation "kubernetes.io/ingress.class" is deprecated, please use 'spec.ingressClassName' instead
W0126 10:05:00.809283   14704 warnings.go:70] annotation "kubernetes.io/ingress.class" is deprecated, please use 'spec.ingressClassName' instead
W0126 10:05:00.909216   14704 warnings.go:70] annotation "kubernetes.io/ingress.class" is deprecated, please use 'spec.ingressClassName' instead
NAME: basyxv2
LAST DEPLOYED: Fri Jan 26 10:04:59 2024
NAMESPACE: basyx-v2
STATUS: deployed
REVISION: 1
TEST SUITE: None

But the aas-environment is not running and showing Init:CrashLoopBackOff and throwing exceptions each time and getting restarted:

NAME                                           READY   STATUS                  RESTARTS      AGE
pod/basyxv2-aas-environment-77d584bf9d-xgsh8   0/1     Init:CrashLoopBackOff   5 (75s ago)   4m43s
pod/basyxv2-aas-registry-84fcfd6b4-q92kd       1/1     Running                 0             4m43s
pod/basyxv2-aas-web-ui-857d4dc8cf-nqc2d        1/1     Running                 0             4m43s
pod/cert-manager-69bc6cc8c4-wrv54              1/1     Running                 0             22m
pod/cert-manager-cainjector-665fb858c-wklc6    1/1     Running                 0             22m
pod/cert-manager-webhook-66c6c87754-vp4b7      1/1     Running                 0             22m
pod/mongodb-59dfc6f759-mlrtz                   1/1     Running                 0             7m13s

I tried checking the logs and here it is:

kubectl logs basyxv2-aas-environment-77d584bf9d-xgsh8 -c aas-environment -n basyx-v2
Error from server (BadRequest): container "aas-environment" in pod "basyxv2-aas-environment-77d584bf9d-xgsh8" is waiting to start: PodInitializing

image

I am using local minikube as of now.

Do you know what could be the possible reasons for this?

@abhishekmaha23
Copy link
Author

abhishekmaha23 commented Jan 26, 2024

My mistake, I missed an edge-condition on startup AASX files being auto-added to the AAS environment container (currently pulled from a public git repository, but fully optional!)
I've added the checks, and it should work now!

@mdanish98
Copy link
Contributor

I tried with this patch but it is throwing some parsing errors (maybe an indentation problem or chomping issue):

Error: INSTALLATION FAILED: YAML parse error on aas-basyx-v2-full/charts/aas-environment/templates/aas-environment-deployment.yaml: error converting YAML to JSON: yaml: line 23: mapping values are not allowed in this context

So, just to try it out I removed all configurations related to the startup from aas-env-deployment.yaml but then the aas-env pod is looping in Init:CrashLoopBackOff again.

@mdanish98
Copy link
Contributor

Hi @abhishekmaha23,

Did you have a chance to check this?

@abhishekmaha23
Copy link
Author

Apologies for the delay! I've been away the last couple of weeks and will fix and update the charts within a couple of days..

@mdanish98
Copy link
Contributor

Hi @abhishekmaha23 ,

Does this latest commit (9e57b9e) fix the issues?

@abhishekmaha23
Copy link
Author

abhishekmaha23 commented Feb 20, 2024

There's still some CORS problems, so I'm updating them right away.
I'm currently working on integrating existing RBAC as well as the SM Registry and AAS Discovery services. I'll add those in the next few commits!

@mdanish98
Copy link
Contributor

Thanks @abhishekmaha23 for the changes.

Below are some of the remarks:

  • The instruction in the Readme specifies creating the configMap for TimeSeriesVisualizerPlugin but the required plugin configured inside the web-gui is HelloWorld. If the TimeSeriesVisualizerPlugin is specified just as an example, then please add the HelloWorld configMap creation as a step inside Readme.
  • AasEnvironment chart is wrongly configured as it is using AasDiscoveryService Image -> Might be a minor change
aas-environment:
  image: 
    name: eclipsebasyx/aas-discovery:2.0.0-SNAPSHOT

  • The usage of values.basyx.yaml is clear but the values.yaml file under each chart configuration are little bit ambiguous, there are two possibilities to solve this from our point of view:
  1. Maybe putting a comment on top of the internal values.yaml would suffice (e.g., this is just an example values file and the configurations should be defined in values.basyx.xml).
  2. By removing all the data from values.yaml and just adding the comment from point 1.

@mdanish98
Copy link
Contributor

mdanish98 commented Apr 5, 2024

Hi @abhishekmaha23
Did you get a chance to work on the requested changes?

@abhishekmaha23
Copy link
Author

Apologies @mdanish98 !
Due to some personal reasons, I was unable to work on this project for a while. I'll continue this week to align with the current project state and update all the components accordingly.

@mdanish98
Copy link
Contributor

Hi @abhishekmaha23 ,

Does your latest commit contain all the requested changes?

@abhishekmaha23
Copy link
Author

Not yet, but I haven't abandoned working on it yet!

@mdanish98
Copy link
Contributor

Hi @abhishekmaha23

Could you please share the status of this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants