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

How-to Openstack Integration #855

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Conversation

louiseschmidtgen
Copy link
Contributor

@louiseschmidtgen louiseschmidtgen commented Nov 28, 2024

How-to Openstack Integration

This PR adds docs: how to integrate Canonical K8s with the Openstack cloud it is deployed on, by adding a layer.

```


Adjust [easyrsa][easyrsa] to avoid creating an LXD machine:
Copy link
Contributor Author

@louiseschmidtgen louiseschmidtgen Nov 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@HomayoonAlimohammadi Is this necessary for our users?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so. Maybe @addyess has a better idea but I think it's not a very special thing. I mean the problem in our envs is that we can not create LXD machines, maybe that's not the case for the user. And what if something else is going wrong with the Openstack deployment of the user? e.g. What if - let's say - Keystone is not configured correctly? Also seems like Openstack on LXD is supported (tho it's only for testing/development purposes).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And even if not using LXD is the way to go when deploying on Openstack, I think we should change the overlay rather than instructing the user to the change the overlay manually.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, i don't think this is critical. I don't know if we ever got to a solution why the openstack instance we're using for testing requires easyrsa to be its own machine. I think we shouldn't note "avoiding creating this LXD machine"

Copy link
Contributor

@HomayoonAlimohammadi HomayoonAlimohammadi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work, thanks a lot @louiseschmidtgen! Left some comments.

docs/src/charm/howto/openstack.md Outdated Show resolved Hide resolved
- 0
relations:
- [openstack-cloud-controller:certificates, easyrsa:client]
- [openstack-cloud-controller:kube-control, kubernetes-control-plane:kube-control]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should change these. For Canonical K8s, it's k8s and k8s-worker.
Also I'm now thinking that we might need to include an Openstack overlay (or overlay template) somewhere in the k8s-bundles repo which is sort of customized for our Canonical K8s charm.
Overall, I think this overlay needs significant changes to work with Canonical K8s (in the K8s Openstack docs I only tested against kubernetes-core bundle).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed we need the k8s template in the k8s-bundles repo and tested before these docs can get published.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@HomayoonAlimohammadi Are you working on verifying the Canonical k8s overlay template already?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No I will create a card for that, but we don't have that for now.

@louiseschmidtgen louiseschmidtgen changed the title How-to openstack integration How-to Openstack Integration Dec 3, 2024
Copy link
Contributor

@addyess addyess left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alrighty so this has alot of detail about how the bundle works. I appreciate that.

Can we use more of the docs from charmed-kubernetes
https://ubuntu.com/kubernetes/docs/openstack-integration

i think it provides a better user experience from the day-2 ops rather than how to get k8s up on openstack

@@ -16,6 +16,7 @@ Overview <self>

charm
install-lxd
openstack
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I imagine at some point, we're going to need to make an "Integrate with Clouds", and detail other clouds like aws, azure, gcp, maas, etc. Even lxd could be counted as one of these clouds (though there isn't much to integrate with)

Comment on lines +11 to +12
- Juju set-up as the deployment tool for Openstack. Please refer to
[Juju and Openstack][juju-openstack] documentation for more information.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ehh --- this isn't REALLY necessary. You just need openstack credentials -- openstack doesn't have to be deployed BY juju

Comment on lines +13 to +14
- A Juju [controller][controller] with [access][credentials] to the OpenStack
cloud environment.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

again -- this isn't super necessary. If you have credentials to openstack, you can TOTALLY bootstrap a VM in openstack to use as your juju controller.

Does any of this from charmed-kubernetes help?
https://ubuntu.com/kubernetes/docs/openstack-integration

[Juju and Openstack][juju-openstack] documentation for more information.
- A Juju [controller][controller] with [access][credentials] to the OpenStack
cloud environment.
- A Juju [model][model] for deploying {{product}} on OpenStack.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once you have bootstrapped a controller on openstack -- it's easy to make a new model for your k8s cluster

```


Adjust [easyrsa][easyrsa] to avoid creating an LXD machine:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, i don't think this is critical. I don't know if we ever got to a solution why the openstack instance we're using for testing requires easyrsa to be its own machine. I think we shouldn't note "avoiding creating this LXD machine"

Comment on lines +60 to +63
```yaml
applications:
kubeapi-load-balancer: null
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's this? I don't think our bundle call out the kubeapi-load-balancer does it? This is used by charmed-kubernetes V1 -- it shouldn't be referenced here i don't think

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.

4 participants