-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #126 from fabric-testbed/knit8
Knit8
- Loading branch information
Showing
73 changed files
with
3,474 additions
and
384 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 |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: GCP-Ubuntu22.04 Test | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
env: | ||
FABRIC_TOKEN: ${{ secrets.FABRIC_TOKEN }} | ||
FABRIC_BASTION_KEY: ${{ secrets.FABRIC_BASTION_KEY }} | ||
FABRIC_SLIVER_KEY: ${{ secrets.FABRIC_SLIVER_KEY }} | ||
FABRIC_SLIVER_PUBKEY: ${{ secrets.FABRIC_SLIVER_PUBKEY }} | ||
FABRIC_PROJECT: ${{ secrets.FABRIC_PROJECT }} | ||
FABRIC_USER: ${{ secrets.FABRIC_USER }} | ||
|
||
GCP_SERVICE_KEY_PATH: ${{ secrets.GCP_SERVICE_KEY_PATH }} | ||
|
||
RUN_GCP: ${{ vars.RUN_GCP }} | ||
|
||
jobs: | ||
GcpOnUbuntuTest: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Print Versions | ||
run: | | ||
python3 --version | ||
pip --version | ||
pwd | ||
whoami | ||
echo ${{ github.workspace }} | ||
echo $HOME | ||
- name: Install Fabfed And Requirements | ||
run: | | ||
pip install --upgrade pip | ||
pip install setuptools --upgrade | ||
pip install --no-cache-dir --ignore-requires-python neo4j==5.18.0 | ||
pip list -v | grep neo4j | ||
pip install --no-cache-dir --ignore-requires-python -r requirements.txt | ||
python3 -m pip install --no-cache-dir . | ||
- name: Run Unit Tests | ||
run: | | ||
pytest tests | ||
- name: Test Stitch Policy | ||
run: | | ||
fabfed stitch-policy -providers "gcp,fabric" | ||
- name: Show Sessions | ||
run: | | ||
fabfed sessions -show | ||
fabfed sessions -show -json | ||
- name: Save Credentials | ||
run: | | ||
mkdir -p ${{ github.workspace }}/creds | ||
echo ${{ env.FABRIC_TOKEN }} | base64 --decode > ${{ github.workspace }}/creds/token.json | ||
echo ${{ env.FABRIC_BASTION_KEY }} | base64 --decode > ${{ github.workspace }}/creds/bastion | ||
echo ${{ env.FABRIC_SLIVER_KEY }} | base64 --decode > ${{ github.workspace }}/creds/sliver | ||
echo ${{ env.FABRIC_SLIVER_PUBKEY }} | base64 --decode > ${{ github.workspace }}/creds/sliver.pub | ||
echo ${{ env.GCP_SERVICE_KEY_PATH }} | base64 --decode > ${{ github.workspace }}/creds/gcp.json | ||
- name: Test GCP | ||
if: ${{ env.RUN_GCP == 'true' }} | ||
run: | | ||
session=cicd-gcp | ||
${{ github.workspace }}/cicd/run-fabfed.sh cicd/test_configs/gcp $session |
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,89 @@ | ||
name: Ubuntu22.04 Modify Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- knit8 | ||
workflow_dispatch: | ||
|
||
env: | ||
FABRIC_TOKEN: ${{ secrets.FABRIC_TOKEN }} | ||
FABRIC_BASTION_KEY: ${{ secrets.FABRIC_BASTION_KEY }} | ||
FABRIC_SLIVER_KEY: ${{ secrets.FABRIC_SLIVER_KEY }} | ||
FABRIC_SLIVER_PUBKEY: ${{ secrets.FABRIC_SLIVER_PUBKEY }} | ||
FABRIC_PROJECT: ${{ secrets.FABRIC_PROJECT }} | ||
FABRIC_USER: ${{ secrets.FABRIC_USER }} | ||
|
||
jobs: | ||
UbuntuModifyTest: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Fabfed And Requirements | ||
run: | | ||
pip install --upgrade pip | ||
pip install setuptools --upgrade | ||
pip install --no-cache-dir --ignore-requires-python neo4j==5.18.0 | ||
pip list -v | grep neo4j | ||
pip install --no-cache-dir --ignore-requires-python -r requirements.txt | ||
python3 -m pip install --no-cache-dir . | ||
pip install --no-cache-dir git+https://gitlab.flux.utah.edu/stoller/portal-tools.git | ||
- name: Save Credentials | ||
run: | | ||
mkdir -p ${{ github.workspace }}/creds | ||
echo ${{ env.FABRIC_TOKEN }} | base64 --decode > ${{ github.workspace }}/creds/token.json | ||
echo ${{ env.FABRIC_BASTION_KEY }} | base64 --decode > ${{ github.workspace }}/creds/bastion | ||
echo ${{ env.FABRIC_SLIVER_KEY }} | base64 --decode > ${{ github.workspace }}/creds/sliver | ||
echo ${{ env.FABRIC_SLIVER_PUBKEY }} | base64 --decode > ${{ github.workspace }}/creds/sliver.pub | ||
- name: Test Fabric Modify with FacilityPort 0 nodes | ||
run: | | ||
export DO_NOT_DESTROY=1 | ||
session=cicd-fabric-facility-port | ||
echo "vlan: 3103" > $session-varfile.yml | ||
echo "node_count: 0" >> $session-varfile.yml | ||
${{ github.workspace }}/cicd/run-fabfed.sh cicd/test_configs/fabric_facility_port $session $session-varfile.yml | ||
- name: Test Fabric Modify with FacilityPort Add One Node | ||
run: | | ||
export DO_NOT_DESTROY=1 | ||
session=cicd-fabric-facility-port | ||
echo "vlan: 3103" > $session-varfile.yml | ||
echo "node_count: 1" >> $session-varfile.yml | ||
${{ github.workspace }}/cicd/run-fabfed.sh cicd/test_configs/fabric_facility_port $session $session-varfile.yml | ||
- name: Test Fabric Modify with FacilityPort Add Another Node | ||
run: | | ||
export DO_NOT_DESTROY=1 | ||
session=cicd-fabric-facility-port | ||
echo "vlan: 3103" > $session-varfile.yml | ||
echo "node_count: 2" >> $session-varfile.yml | ||
${{ github.workspace }}/cicd/run-fabfed.sh cicd/test_configs/fabric_facility_port $session $session-varfile.yml | ||
- name: Test Fabric Modify with FacilityPort Remove One Node | ||
run: | | ||
export DO_NOT_DESTROY=1 | ||
session=cicd-fabric-facility-port | ||
echo "vlan: 3103" > $session-varfile.yml | ||
echo "node_count: 1" >> $session-varfile.yml | ||
${{ github.workspace }}/cicd/run-fabfed.sh cicd/test_configs/fabric_facility_port $session $session-varfile.yml | ||
- name: Test Fabric Modify with FacilityPort Remove One Node | ||
run: | | ||
export DO_NOT_DESTROY=1 | ||
session=cicd-fabric-facility-port | ||
echo "vlan: 3103" > $session-varfile.yml | ||
echo "node_count: 0" >> $session-varfile.yml | ||
${{ github.workspace }}/cicd/run-fabfed.sh cicd/test_configs/fabric_facility_port $session $session-varfile.yml | ||
- name: Test Fabric Modify with FacilityPort Destroy | ||
run: | | ||
export DO_NOT_DESTROY=0 | ||
session=cicd-fabric-facility-port | ||
echo "vlan: 3103" > $session-varfile.yml | ||
echo "node_count: 0" >> $session-varfile.yml | ||
${{ github.workspace }}/cicd/run-fabfed.sh cicd/test_configs/fabric_facility_port $session $session-varfile.yml |
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 |
---|---|---|
|
@@ -153,3 +153,6 @@ venv | |
|
||
# emacs auto-save | ||
*.*~ | ||
|
||
# jupyter artifacts | ||
.ipynb_checkpoints |
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,17 @@ | ||
ARG base_image=ubuntu:24.04 | ||
|
||
FROM ${base_image} | ||
|
||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
RUN apt-get update && apt-get -u -y install lsb-release python3 binutils python3-venv python3-pip wget git bash-completion vim yq jq \ | ||
&& apt-get -qq purge && apt-get -qq clean && rm -rf /var/lib/apt/lists/* | ||
|
||
RUN pip install --break-system-packages jupyterlab | ||
COPY /requirements.txt /tmp/ | ||
RUN pip install --no-cache-dir --break-system-packages --ignore-requires-python -r /tmp/requirements.txt | ||
|
||
COPY ./setup.py ./tools ./README.md ./MANIFEST.in /requirements.txt / | ||
COPY ./fabfed /fabfed | ||
COPY ./tools /tools | ||
RUN python3 -m pip install --break-system-packages --no-cache-dir . |
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
Oops, something went wrong.