-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolved merge conflict by incorporating both suggestions.
- Loading branch information
Showing
24 changed files
with
276 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,7 @@ jobs: | |
name: Check scripts format | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3.1.0 | ||
- uses: actions/checkout@v3.3.0 | ||
- name: Run the sh-checker | ||
uses: luizm/[email protected] | ||
env: | ||
|
@@ -44,7 +44,7 @@ jobs: | |
env: | ||
DEBUG: true | ||
steps: | ||
- uses: actions/checkout@v3.1.0 | ||
- uses: actions/checkout@v3.3.0 | ||
- name: Install dependencies and configures kind clusters | ||
working-directory: ./scripts | ||
run: ./install.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,7 @@ jobs: | |
check-dockerfile: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3.1.0 | ||
- uses: actions/checkout@v3.3.0 | ||
- name: update Dockerfile | ||
uses: ludeeus/[email protected] | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
## © 2022 Nephio Authors | ||
## Licensed under the Apache License 2.0 | ||
## SPDX-License-Identifier: Apache-2.0 | ||
|
||
--- | ||
- name: installing clab | ||
become: true | ||
shell: bash -c "$(wget -qO - https://get.containerlab.dev)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
nephio-ansible-install/roles/docker/tasks/docker-Debian.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
## © 2023 Nephio Authors | ||
## Licensed under the Apache License 2.0 | ||
## SPDX-License-Identifier: Apache-2.0 | ||
|
||
--- | ||
- name: ensure repository key is installed | ||
become: true | ||
ansible.builtin.apt_key: | ||
url: https://download.docker.com/linux/ubuntu/gpg | ||
state: present | ||
|
||
- name: ensure docker registry is available | ||
become: true | ||
apt_repository: repo='deb https://download.docker.com/linux/ubuntu bionic stable' state=present | ||
|
||
- name: ensure docker and dependencies are installed | ||
become: true | ||
apt: name=docker-ce update_cache=yes |
37 changes: 37 additions & 0 deletions
37
nephio-ansible-install/roles/docker/tasks/docker-RedHat.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
## © 2023 Nephio Authors | ||
## Licensed under the Apache License 2.0 | ||
## SPDX-License-Identifier: Apache-2.0 | ||
|
||
--- | ||
- name: set mydistribution | ||
ansible.builtin.set_fact: | ||
mydistribution: "{{ 'rhel' if (ansible_distribution == 'RedHat') else (ansible_distribution | lower) }}" | ||
|
||
- name: Add signing key | ||
ansible.builtin.rpm_key: | ||
key: "https://download.docker.com/linux/{{ mydistribution }}/gpg" | ||
state: present | ||
|
||
- name: Add repository into repo.d list | ||
ansible.builtin.yum_repository: | ||
name: docker | ||
description: docker repository | ||
baseurl: "https://download.docker.com/linux/{{ mydistribution }}/$releasever/$basearch/stable" | ||
enabled: true | ||
gpgcheck: true | ||
gpgkey: "https://download.docker.com/linux/{{ mydistribution }}/gpg" | ||
|
||
- name: Install Docker | ||
ansible.builtin.yum: | ||
name: | ||
- docker-ce | ||
- docker-ce-cli | ||
- containerd.io | ||
state: latest | ||
update_cache: true | ||
|
||
- name: Start Docker | ||
ansible.builtin.service: | ||
name: "docker" | ||
enabled: true | ||
state: started |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
## © 2023 Nephio Authors | ||
## Licensed under the Apache License 2.0 | ||
## SPDX-License-Identifier: Apache-2.0 | ||
--- | ||
|
||
- name: login into dockerhub | ||
docker_login: | ||
username: "{{ dockerhub_username }}" | ||
password: "{{ dockerhub_token }}" |
8 changes: 8 additions & 0 deletions
8
nephio-ansible-install/roles/dockerhub/logout/tasks/main.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
## © 2023 Nephio Authors | ||
## Licensed under the Apache License 2.0 | ||
## SPDX-License-Identifier: Apache-2.0 | ||
--- | ||
|
||
- name: logout of Dockerhub | ||
docker_login: | ||
state: absent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
nephio-ansible-install/roles/nephio/config/tasks/manifest_mgmt_files.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
## © 2022 Nephio Authors | ||
## Licensed under the Apache License 2.0 | ||
## SPDX-License-Identifier: Apache-2.0 | ||
|
||
--- | ||
- name: github repo | ||
set_fact: | ||
github_repo: "{{ 'https://github.com/{{ github_organization}}/nephio-catalog.git' if github_organization is defined else 'https://github.com/{{ github_username}}/nephio-catalog.git' }}" | ||
when: | ||
- github_username is defined | ||
|
||
- name: copy mgmt github repo | ||
template: | ||
src: "{{ role_path }}/templates/github-mgmt-repo.j2" | ||
dest: "{{ tmp_directory }}/github-mgmt-repo-catalog.yaml" | ||
mode: 0644 | ||
when: | ||
- github_username is defined | ||
|
||
- name: configure mgmt github repo | ||
shell: kubectl --kubeconfig ~/.kube/mgmt-config apply -f {{ tmp_directory }}/github-mgmt-repo-catalog.yaml | ||
when: | ||
- github_username is defined | ||
|
||
- name: copy edge gitea repo | ||
template: | ||
src: "{{ role_path }}/templates/gitea-mgmt-repo.j2" | ||
dest: "{{ tmp_directory }}/gitea-mgmt-repo-catalog.yaml" | ||
mode: 0644 | ||
when: | ||
- gitea_username is defined | ||
|
||
- name: configure edge gitea repo | ||
shell: kubectl --kubeconfig ~/.kube/mgmt-config apply -f {{ tmp_directory }}/gitea-mgmt-repo-catalog.yaml | ||
when: | ||
- gitea_username is defined |
18 changes: 18 additions & 0 deletions
18
nephio-ansible-install/roles/nephio/config/templates/gitea-mgmt-repo.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
apiVersion: config.porch.kpt.dev/v1alpha1 | ||
kind: Repository | ||
metadata: | ||
name: catalog | ||
namespace: default | ||
labels: | ||
kpt.dev/repository-content: organizational-blueprints | ||
spec: | ||
content: Package | ||
deployment: false | ||
git: | ||
branch: main | ||
createBranch: true | ||
directory: / | ||
repo: http://gitea:3000/nephio/nephio-catalog.git | ||
secretRef: | ||
name: gitea-access-token | ||
type: git |
17 changes: 17 additions & 0 deletions
17
nephio-ansible-install/roles/nephio/config/templates/github-mgmt-repo.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
apiVersion: config.porch.kpt.dev/v1alpha1 | ||
kind: Repository | ||
metadata: | ||
name: catalog | ||
namespace: default | ||
labels: | ||
kpt.dev/repository-content: organizational-blueprints | ||
spec: | ||
content: Package | ||
deployment: false | ||
git: | ||
branch: main | ||
directory: / | ||
repo: {{github_repo}} | ||
secretRef: | ||
name: github-personal-access-token | ||
type: git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.