nephio-project / nephio

Nephio is a Kubernetes-based automation platform for deploying and managing highly distributed, interconnected workloads such as 5G Network Functions, and the underlying infrastructure on which those workloads depend.
Apache License 2.0
96 stars 52 forks source link

Installer for Nephio #22

Closed gvbalaji closed 1 year ago

gvbalaji commented 1 year ago

Processes, tools, and other artifacts needed to build, test, and package the components and the overall Nephio solution. Document the dependencies, process of packaging all components and installing Nephio ( preferably with a script)

We need to decide where this should reside in may be a repo like nephio-installer or getting started.

There is a difference between this and the sandbox we create for E2E tests. Sandbox could be the entire set up that includes KIND clusters (both management and workload) and installing packages on them including networking configuration etc, where as scope of the installer is different. The scope should be

So E2E test bed sandbox is highly opinionated where as installer should work on any k8s cluster with possible instructions for networking setup for GRPC communications

electrocucaracha commented 1 year ago

Hi @gvbalaji , I was thinking about this one and I have some ideas that I want to try, could you assign this to me?

johnbelamaric commented 1 year ago

It seems "packaging" is part of SIG 2 not SIG 3 like I thought. Moving this.

electrocucaracha commented 1 year ago

@johnbelamaric I have some progress on this task here, it needs more reviews and verification.

johnbelamaric commented 1 year ago

Awesome, nice Victor. A few thoughts:

1) If I create a repo in nephio-project for this, can you move it there? 2) We may want to discuss in an upcoming meeting - not sure which. I think we can put this in pkg mgmt subproject for now. 3) I am hoping we can "dogfood" a bit and use kpt packages to bootstrap the post-cluster creation install. I think you may already be doing that, I see kpt stuff in there. 4) I want to be sure we layer things so creating the "demo sandbox" and installing in a production cluster share the "nephio install" part. Does the tool cover both these or primarily one or the other? 5) I am thinking, once we have cluster creation as part of Nephio, the tool can just bootstrap the environment - install the basic Nephio stuff on the mgmt cluster - and then Nephio can do the rest (e.g., workload cluster provisioning). We would be limited though by not having any solution for intercluster networking, though, unless we do that too.

electrocucaracha commented 1 year ago

Awesome, nice Victor. A few thoughts:

1. If I create a repo in nephio-project for this, can you move it there?

Yes, this repo can be moved into nephio-project org, I have few concerns about licensing (like adding Samsung's header) and keeping or changing the method to provision dependencies, currently I'm installing them through some scripts in other project which can cause some unnecessary burden.

2. We may want to discuss in an upcoming meeting - not sure which. I think we can put this in pkg mgmt subproject for now.

Agree, wherever that makes sense.

3. I am hoping we can "dogfood" a bit and use kpt packages to bootstrap the post-cluster creation install. I think you may already be doing that, I see kpt stuff in there.

I couldn't find a way to consume kpt API directly, so I ended wrapping the CLI and calling it from a component which contains the Nephio logic. This is an initial proposal, but I'm sure there are more skillful gophers there.

4. I want to be sure we layer things so creating the "demo sandbox" and installing in a production cluster share the "nephio install" part. Does the tool cover both these or primarily one or the other?

For the K8s cluster(s) creation, I've separated the process in the multi-cluster tool which basically uses some portion of Antonio Ojea multicluster project. I'm not sure if we have to consider this other project as part of Nephio but facilitates the setup using config files

5. I am thinking, once we have cluster creation as part of Nephio, the tool can just bootstrap the environment - install the basic Nephio stuff on the mgmt cluster - and then Nephio can do the rest (e.g., workload cluster provisioning). We would be limited though by not having any solution for intercluster networking, though, unless we do that too.

The tool is inspired by kubeadm, so there are mainly two steps: init and join. These steps will deploy Nephio services on K8s clusters which are pointed by kubeconfig

gvbalaji commented 1 year ago

After discussions with @aravind254 I have updated the description of this story. Basically how is this different from sandbox for the E2E testing? I have tried to explain and put my thoughts in the description. We should further discuss this.

electrocucaracha commented 1 year ago

After discussions with @aravind254 I have updated the description of this story. Basically how is this different from sandbox for the E2E testing? I have tried to explain and put my thoughts in the description. We should further discuss this.

We can adjust the installer to consume different sources, so during the E2E testing the installer can consume non-release or intermediate sources (images, packages, etc.)

johnbelamaric commented 1 year ago

cc @rravindran123 @vjayaramrh

johnbelamaric commented 1 year ago

Any update here?

electrocucaracha commented 1 year ago

The internal process to release the seed code is taking more than expected. We decided to create a placeholder/function for now to eventually replace the functionality in the near future.

vjayaramrh commented 1 year ago

@electrocucaracha @rravindran123 Per our discussion below are the steps to bring up a nephio management cluster with ansible playbooks that does not install the nephio package components

1. Follow the steps at link https://github.com/nephio-project/one-summit-22-workshop/tree/main/nephio-ansible-install#installation.
    1.1 When creating the inventory/nephio.yaml file, comment out clusters->edge1, clusters->edge2, clusters->region1
2. Next, follow instructions at https://github.com/nephio-project/one-summit-22-workshop/tree/main/nephio-ansible-install#deploy-nephio-environment by applying skip-tags as below
    2.1 ansible-playbook playbooks/install-prereq.yaml —skip-tags nephio
    2.2 ansible-playbook playbooks/deploy-clusters.yaml —skip-tags Nephio
3. Optionally, you can install either create the github repos (3.1) or gitea repos (3.2.1 and 3.2.2)
   3.1 ansible-playbook playbooks/create-repos.yaml
   3.2.1 ansible-playbook playbooks/create-gitea.yaml
   3.2.2 ansible-playbook playbooks/create-gitea-repos.yaml
johnbelamaric commented 1 year ago

Can we get a little user guide and a link to how to do this, then we can close this issue?

johnbelamaric commented 1 year ago

https://github.com/nephio-project/test-infra/tree/main/e2e/provision#quick-start-for-gce

Is sufficient for this issue