microcks / microcks-ansible-operator

Kubernetes Operator for easy setup and management of Microcks installs
Apache License 2.0
24 stars 5 forks source link

Operator install in one single file #22

Closed hguerrero closed 3 years ago

hguerrero commented 3 years ago

Create a single file install for all the resources required by the operator. For example, like strimzi does.

hguerrero commented 3 years ago

Ok, I think this belongs to the operator instead of microcks. Can we transfer it?

lbroudoux commented 3 years ago

HI @hguerrero,

Done ;-)

I can not found any documentation on the Strimzi simple installation procedure though ... The instructions found here always imply cloning the repository, sedding some files and applying a whole folder full of YAML files.

Have you seen something simpler than that ?

Don't know if you seen them but we have simple install-latest-on-minikube.sh and install-latest-on-openshift.sh scripts that are pretty simple to use if you want to quickly drive a test?

hguerrero commented 3 years ago

Hi @lbroudoux

this is the suggested approach: https://strimzi.io/quickstarts/


Next we apply the Strimzi install files, including ClusterRoles, ClusterRoleBindings and some Custom Resource Definitions (CRDs). The CRDs define the schemas used for declarative management of the Kafka cluster, Kafka topics and users.

kubectl apply -f 'https://strimzi.io/install/latest?namespace=kafka' -n kafka
lbroudoux commented 3 years ago

Ha ha ! Ok, understood !

However they should have dynamic behavior on the server side to render correct YAML files including the namespace param. No ? As we just have a website holding static content, it will be tricky... Other ideas ?

lbroudoux commented 3 years ago

Or it could be a big one-liner command doing curl | sed | kubectl apply -n - sort of things ?

hguerrero commented 3 years ago

It depends how many namespaces dependencies are in the resources. I think everything should land in the microcks namespace right? is the operator clusterwide or namespaced?

lbroudoux commented 3 years ago

The operator is namespaced

hguerrero commented 3 years ago

The yes, a curl | sed | kubectl should work fine.

lbroudoux commented 3 years ago

Not really a "one command line install" but here's the shorter you can make:

minikube start --vm=true --cpus=4 --memory=6144 # 2cpus and 2GB default memory isn't always enough
kubectl create namespace microcks
kubectl apply -f 'https://strimzi.io/install/latest?namespace=microcks' -n microcks
kubectl apply -f https://microcks.io/operator/operator-latest.yaml -n microcks
curl https://microcks.io/operator/minikube-features.yaml -s | sed 's/KUBE_APPS_URL/'$(minikube ip)'.nip.io/g' | kubectl apply -n microcks -f -

For those who'd need to access cluster for outside, they'll also have to add:

minikube addons enable ingress
kubectl patch -n kube-system deployment/ingress-nginx-controller --type='json' \
    -p '[{"op":"add","path":"/spec/template/spec/containers/0/args/-","value":"--enable-ssl-passthrough"}]'

Full documentation should be added on Microcks.io though