Giter Site home page Giter Site logo

Comments (15)

mnaser avatar mnaser commented on September 4, 2024 1

FYI, we have created #151 and #152 -- we'll try and add support to those.

We've had a lot of interesting comments here, is there any other deployment tool being used that users would like support for?

from magnum-cluster-api.

okozachenko1203 avatar okozachenko1203 commented on September 4, 2024

Brief order:

  • install k8s cluster
    This cluster should be running on the same network with magnum host so magnum-cluster-api driver can communicate with it.
    You can install k8s cluster in any method. (even you can simply install kind cluster).
  • install cluster-api on the k8s cluster
sudo curl -Lo /usr/local/bin/clusterctl https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.2.4/clusterctl-linux-amd64
sudo chmod +x /usr/local/bin/clusterctl
export EXP_CLUSTER_RESOURCE_SET=true
export CLUSTER_TOPOLOGY=true
clusterctl init \
   --core cluster-api:v1.3.0-rc.0 \
   --bootstrap kubeadm:v1.3.0-rc.0 \
   --control-plane kubeadm:v1.3.0-rc.0
curl -L https://storage.googleapis.com/artifacts.k8s-staging-capi-openstack.appspot.com/components/nightly_main_20221109/infrastructure-components.yaml | kubectl apply -f-
  • install magnum-cluster-api driver on your cloud
    This depends on how you deployed your cloud.

    • Manual deployment of canonical openstack
      install magnum-cluster-api pip package on magnum host
    pip install magnum-cluster-api==0.2.6
  • Copy kubeconfig file at the path ~/.kube/config of magnum host

  • Create coe cluster template

pushd /tmp
source /opt/stack/openrc
for version in v1.23.13 v1.24.7 v1.25.3; do \
   curl -LO https://object-storage.public.mtl1.vexxhost.net/swift/v1/a91f106f55e64246babde7402c21b87a/magnum-capi/ubuntu-2004-${version}.qcow2; \
   openstack image create ubuntu-2004-${version} --disk-format=qcow2 --container-format=bare --property os_distro=ubuntu-focal --file=ubuntu-2004-${version}.qcow2; \
   openstack coe cluster template create \
      --image $(openstack image show ubuntu-2004-${version} -c id -f value) \
      --external-network public \
      --dns-nameserver 8.8.8.8 \
      --master-lb-enabled \
      --master-flavor m1.medium \
      --flavor m1.medium \
      --network-driver calico \
      --docker-storage-driver overlay2 \
      --coe kubernetes \
      --label kube_tag=${version} \
      k8s-${version};
done;
popd /tmp

from magnum-cluster-api.

nguyenhuukhoi avatar nguyenhuukhoi commented on September 4, 2024

Hello.
*install k8s cluster
*install cluster-api on the k8s cluster

Could you explain why need these steps?

from magnum-cluster-api.

okozachenko1203 avatar okozachenko1203 commented on September 4, 2024

Hello. *install k8s cluster *install cluster-api on the k8s cluster

Could you explain why need these steps?

@ngyenhuukhoi if i understood your question correctly, we need a management k8s cluster where cluster-api is running on because this driver depends on cluster-api.
You can follow this for cluster-api installation https://github.com/vexxhost/magnum-cluster-api/blob/main/hack/stack.sh#L80-L91

from magnum-cluster-api.

nguyenhuukhoi avatar nguyenhuukhoi commented on September 4, 2024

Thank you for ur reply.
"install k8s cluster". what we do it after launching k8s via magnum or what. We need these step guide clearly with normal users. I am going to test this, only this step which I dont understand.

from magnum-cluster-api.

okozachenko1203 avatar okozachenko1203 commented on September 4, 2024

Thank you for ur reply. "install k8s cluster". what we do it after launching k8s via magnum or what. We need these step guide clearly with normal users. I am going to test this, only this step which I dont understand.

This k8s cluster is not the cluster managed by Magnum.
This k8s cluster is just needed for cluster-api running. Cluster-api is the pre-requsite for this driver.

I drew an ugly arch picture. Hope it helps understanding.
This k8s cluster is a mgmt.cluster where cluster-api runs. Magnum and our driver will interact with cluster-api(running on the mgmt. cluster) to provision/de-provision workload clusters(coe clusters managed by magnum).

magnum-capi-driver

I suggest you take a look at the cluster-api docs and it will help you get things clearer https://cluster-api.sigs.k8s.io/introduction.html

from magnum-cluster-api.

nguyenhuukhoi avatar nguyenhuukhoi commented on September 4, 2024

from magnum-cluster-api.

groundnuty avatar groundnuty commented on September 4, 2024

@okozachenko1203 Could you elaborate on

  • Copy kubeconfig file at the path ~/.kube/config of magnum host

is it kubeconfig of management cluster so the magnum-cluster-api knows how to reach back to it? If so, then k8s cluster created with kind needs to have API port reachable over the network yep?

I have the kolla setup, I ran pip install magnum-cluster-api inside magnum_api container and restarted:

/var/lib/kolla/venv/bin/python3 /var/lib/kolla/venv/bin/magnum-api --config-file /etc/magnum/magnum.conf

process. Is that enough? I don't want to build images yet.

Also, could you elaborate on how magnum-cluster-api 'hijacks' the normal magnum API, so that openstack coe cluster template create command actually talks to magnum-cluster-api ? or maybe I understand the whole concept wrong?

from magnum-cluster-api.

mnaser avatar mnaser commented on September 4, 2024

@okozachenko1203 Could you elaborate on

  • Copy kubeconfig file at the path ~/.kube/config of magnum host

is it kubeconfig of management cluster so the magnum-cluster-api knows how to reach back to it? If so, then k8s cluster created with kind needs to have API port reachable over the network yep?

This is correct!

I have the kolla setup, I ran pip install magnum-cluster-api inside magnum_api container and restarted:

/var/lib/kolla/venv/bin/python3 /var/lib/kolla/venv/bin/magnum-api --config-file /etc/magnum/magnum.conf

process. Is that enough? I don't want to build images yet.

That should indeed be enough

Also, could you elaborate on how magnum-cluster-api 'hijacks' the normal magnum API, so that openstack coe cluster template create command actually talks to magnum-cluster-api ? or maybe I understand the whole concept wrong?

We register a driver inside Magnum so that when os_distro is ubuntu-focal, then the driver is used:

https://github.com/vexxhost/magnum-cluster-api/blob/main/magnum_cluster_api/driver.py#L280-L285

from magnum-cluster-api.

nguyenhuukhoi avatar nguyenhuukhoi commented on September 4, 2024

Can we change it from to Copy kubeconfig file at the path ~/.kube/config of magnum host Copy kubeconfig file at the path ~/.kube/config of k8s capi cluster to make it clear,

from magnum-cluster-api.

mnaser avatar mnaser commented on September 4, 2024

@ngyenhuukhoi is there any other distro that you use which would make sense to keep this ticket open?

from magnum-cluster-api.

nguyenhuukhoi avatar nguyenhuukhoi commented on September 4, 2024

from magnum-cluster-api.

mnaser avatar mnaser commented on September 4, 2024

We have tasks to integrate this driver with both Kolla and OSA, do you know of any other OpenStack distribution that we should cover in integrations?

from magnum-cluster-api.

nguyenhuukhoi avatar nguyenhuukhoi commented on September 4, 2024

Hello,
I know only Kolla and OSA which r the most famous tool.
Thank you for response,

from magnum-cluster-api.

mnaser avatar mnaser commented on September 4, 2024

closing in favour of #151 and #152

from magnum-cluster-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.