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 COS module #282

Merged
merged 1 commit into from
Dec 14, 2024
Merged

Add COS module #282

merged 1 commit into from
Dec 14, 2024

Conversation

dosaboy
Copy link
Member

@dosaboy dosaboy commented Dec 5, 2024

No description provided.

@lathiat
Copy link
Contributor

lathiat commented Dec 10, 2024

There's no need to create a second controller, you can add-k8s to your existing controller.

Also lets make sure we name the model and the cross-model offers with the same name as FCE if possible. As it makes it easier to copy/paste commands to customers. However the names FCE uses, COS docs use and sunbeam etc use are all different so that is an issue.

Lastly you can deploy ceph-csi and relate it to microk8s now (did not used to be possible).

Some reference commands for inspiration from this internal doc:

cd ~/src/stssstack-bundles/ceph
./generate-bundle.sh -r yoga -s jammy -n quincy --run --ceph-rgw --ceph-rgw-ha --ceph-dashboard

juju add-model microk8s
juju deploy -m microk8s microk8s --channel 1.28/stable --constraints "root-disk=64G mem=8G cores=12"  --config hostpath_storage=true
juju wait-for application microk8s  --summary

kubeconfig="$(juju exec --unit microk8s/leader -- microk8s config)"
controller="$(juju controller-config controller-name)"
echo "$kubeconfig" | juju add-k8s microk8s --controller "$controller"

# It is not possible to configure metallb with a config option, so we need a separate model. You can enable it manually but then can't configure the external IP range. This is the IPs the load balancers will get (e.g. to access grafana, loki, etc) on the network of the microk8s machine.
# Another way to do it is to manually run 'microk8s enable metallb' but that's not a reproducible deploy.
juju add-model metallb microk8s

# For ProdStack6..
# Modify your subnet to remove a few IPs from the neutron allocation range
# You'll need to adjust this with the range of your own subnet.. then set these as iprange
# openstack subnet set subnet_stg-reproducer-lathiat-psd --no-allocation-pool --allocation-pool start=10.149.131.130,end=10.149.131.240

juju deploy -m metallb metallb --channel 1.28/stable --config iprange="10.139.131.241-10.149.131.245"
juju wait-for application metallb  --summary

juju add-model cos microk8s
 # stable channel has a broken grafana somehow
juju deploy cos-lite --trust

juju wait-for application grafana


# grafana-agent
juju deploy grafana-agent --channel edge
juju integrate grafana-agent:logging-consumer cos.loki-logging
juju integrate grafana-agent:send-remote-write cos.prometheus-receive-remote-write
juju integrate grafana-agent:grafana-dashboards-provider cos.grafana-dashboard

juju relate grafana-agent ceph-mon
juju relate grafana-agent ceph-osd
juju relate grafana-agent ceph-rgw

# ceph native COS support
juju integrate ceph-mon:metrics-endpoint cos.prometheus-scrape

# TODO: ceph-dashboard support and vault per https://github.com/openstack/charm-ceph-dashboard
juju offer cos.prometheus-k8s:metrics-endpoint
juju offer cos.grafana:grafana-dashboard

juju consume cos.prometheus
juju consume cos.grafana

juju relate prometheus cos-proxy:downstream-prometheus-scrape
juju relate grafana cos-proxy:downstream-grafana-dashboard

juju run traefik/0 show-proxied-endpoints --format=yaml | yq '."traefik/0".results."proxied-endpoints"' | jq
juju show-unit catalogue/0 | grep url
juju run grafana/0  -m cos get-admin-password --wait 1m
juju run ceph-dashboard/0 add-user username=admin role=administrator

@dosaboy dosaboy force-pushed the cos branch 2 times, most recently from 0ae01b5 to 315ac01 Compare December 11, 2024 15:04
@dosaboy dosaboy marked this pull request as ready for review December 11, 2024 15:05
@dosaboy dosaboy force-pushed the cos branch 25 times, most recently from c4a66a5 to 8813845 Compare December 12, 2024 19:18
@dosaboy dosaboy force-pushed the cos branch 11 times, most recently from 6e4ef67 to f62c07a Compare December 13, 2024 16:10
@dosaboy
Copy link
Member Author

dosaboy commented Dec 14, 2024

I am using this COS module and it deploys well. I'm going to merge in its current form and we can iterate on making it better if needs be.

@dosaboy dosaboy merged commit 014389f into canonical:main Dec 14, 2024
3 checks passed
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.

2 participants