-
Notifications
You must be signed in to change notification settings - Fork 36
Documentation Openstack #70
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
Changes from all commits
aa11a76
c9ffca5
bda1dfe
b8d6282
d0fea2e
f7efbf2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,156 @@ | ||
| # OpenStack Multi-Cluster Deployment Management with Nephio | ||
|
|
||
|
|
||
| ## Prerequisites | ||
|
|
||
| * Openstack Cluster Managment (master) | ||
| * 4 VCPU 4 NODES | ||
| * 8GB RAM | ||
| * Kubernetes version 1.24+ | ||
| * Openstack Cluster Edge n | ||
| * 2 VCPU 1 NODE | ||
| * 4GB RAM | ||
| * Kubernetes version 1.24+ | ||
| * KPT beta [realeses](https://github.com/kptdev/kpt/releases) | ||
|
|
||
| ## Automatic Installation of the managment cluster | ||
| * Change ansible variables to reflect your cluster and run the installation script | ||
|
|
||
| 1. Add the following to *test-infra\e2e\provision\playbooks\roles\bootstrap\tasks\prep-gitea.yml* | ||
| ```- name: Create PersistentVolume | ||
| kubernetes.core.k8s: | ||
| context: "{{ k8s.context }}" | ||
| state: present | ||
| definition: | ||
| apiVersion: v1 | ||
| kind: PersistentVolume | ||
| metadata: | ||
| name: data-gitea-postgresql-0 | ||
| spec: | ||
| capacity: | ||
| storage: 10Gi | ||
| volumeMode: Filesystem | ||
| accessModes: | ||
| - ReadWriteOnce | ||
| storageClassName: standard | ||
| hostPath: | ||
| path: /tmp/ | ||
| namespace: "{{ gitea.k8s.namespace }}" | ||
|
|
||
| - name: Create PersistentVolumeClaim | ||
| kubernetes.core.k8s: | ||
| context: "{{ k8s.context }}" | ||
| state: present | ||
| definition: | ||
| apiVersion: v1 | ||
| kind: PersistentVolumeClaim | ||
| metadata: | ||
| name: data-gitea-postgresql-0 | ||
| spec: | ||
| storageClassName: standard | ||
| accessModes: | ||
| - ReadWriteOnce | ||
| resources: | ||
| requests: | ||
| storage: 10Gi | ||
| namespace: "{{ gitea.k8s.namespace }}" | ||
|
|
||
| - name: Create PersistentVolume | ||
| kubernetes.core.k8s: | ||
| context: "{{ k8s.context }}" | ||
| state: present | ||
| definition: | ||
| apiVersion: v1 | ||
| kind: PersistentVolume | ||
| metadata: | ||
| name: data-gitea-0 | ||
| spec: | ||
| capacity: | ||
| storage: 10Gi | ||
| volumeMode: Filesystem | ||
| accessModes: | ||
| - ReadWriteOnce | ||
| storageClassName: standard | ||
| hostPath: | ||
| path: /tmp/ | ||
| namespace: "{{ gitea.k8s.namespace }}" | ||
|
|
||
| - name: Create PersistentVolumeClaim | ||
| kubernetes.core.k8s: | ||
| context: "{{ k8s.context }}" | ||
| state: present | ||
| definition: | ||
| apiVersion: v1 | ||
| kind: PersistentVolumeClaim | ||
| metadata: | ||
| name: data-gitea-0 | ||
| spec: | ||
| storageClassName: standard | ||
| accessModes: | ||
| - ReadWriteOnce | ||
| resources: | ||
| requests: | ||
| storage: 10Gi | ||
| namespace: "{{ gitea.k8s.namespace }}" | ||
| ``` | ||
| 2. Change context value from all the *test-infra\e2e\provision\playbooks* yaml files into your kubernetes context: `kubectl config get-contexts` | ||
|
|
||
| context: kubernetes-admin@cluster.local | ||
|
Comment on lines
+96
to
+98
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes I manually changed all of them. I know this is not ideal, but I wanted to see if the ansible script would also work in a different environment.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll submit the PR for that and expose the value in a variable.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| 3. Disable kind installation in | ||
| *test-infra\e2e\provision\playbooks\roles\bootstrap\defaults\main.yml* | ||
|
|
||
| kind: | ||
| enabled: false | ||
|
|
||
|
|
||
| 4. Override the check specitifaction values and run the installation script in | ||
| *test-infra\e2e\provision\install_sandbox.sh* by | ||
| ``` | ||
| NEPHIO_HOST_MIN_VCPU=4 NEPHIO_HOST_MIN_CPU_RAM=8 ./install_sandbox.sh | ||
| ``` | ||
|
|
||
| ## Manual Installation of the managment cluster using kpt | ||
| TDB (manual install of kpt, porch, configsync, nephio-webui, capi, metallb) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ideally the management cluster should be installed with the Install Ansible role |
||
|
|
||
| ## Manual Installation of the Edge cluster using kpt | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think that edge clusters should be provisioned by Cluster API, which means that we need to create a new package on the existing catalog like this one or something new here
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi Victor, I wanted to address the use case where the user doesn't have access to the provisioning process. For instance, I do not have access to the OpenStack cluster provisioning cli within my organization. I can, though, request a cluster using an internal process.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Got it, maybe we need to specify that as requirement on the prerequesites section or in this document. /cc @johnbelamaric |
||
|
|
||
| ``` | ||
| kpt pkg get https://github.com/nephio-project/nephio-packages.git/nephio-configsync@v1.0.1 | ||
| ``` | ||
|
|
||
| Change *nephio-configsync/rootsync.yaml* and point spec.git.repo to the edge git repository | ||
| ``` | ||
| spec: | ||
| sourceFormat: unstructured | ||
| git: | ||
| repo: <http url of your edge repo> | ||
| branch: main | ||
| auth: none | ||
| ``` | ||
| Deploy the modified configsync | ||
| ``` | ||
| kpt live init nephio-configsync | ||
| kpt live apply nephio-configsync --reconcile-timeout=5m | ||
| ``` | ||
|
|
||
| ## Configure Managment Cluster to manage Edge Cluster | ||
| Get a [github token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#fine-grained-personal-access-tokens) if your repository is private, or allow Porch to make modifications. | ||
|
|
||
| Register the edge repository using kpt cli or nephio web-ui. | ||
| ``` | ||
| GITHUB_USERNAME=<Github Username> | ||
| GITHUB_TOKEN=<GitHub Token> | ||
|
|
||
| kpt alpha repo register \ | ||
| --namespace default \ | ||
| --repo-basic-username=${GITHUB_USERNAME} \ | ||
| --repo-basic-password=${GITHUB_TOKEN} \ | ||
| --create-branch=true \ | ||
| --deployment=true \ | ||
| <http url of your edge repo> | ||
| ``` | ||
|
|
||
| ## Deploy packages to the edge clusters | ||
| Using the web-ui add a new deployment with destination the edge cluster. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe those resources can add to the gitea package to simplify the process