Skip to content

Commit

Permalink
Update clusterapi
Browse files Browse the repository at this point in the history
Signed-off-by: Artem Glazychev <[email protected]>
  • Loading branch information
glazychev-art committed Mar 7, 2024
1 parent c40676d commit 6996509
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 18 deletions.
42 changes: 25 additions & 17 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,41 @@ jobs:
- name: Set up /bin permissions
run: |
sudo chmod -R 777 /bin
- name: Install metal CLI
run: |
curl -L https://github.com/equinix/metal-cli/releases/download/v0.22.0/metal-linux-amd64 -o metal
chmod +x ./metal
mv ./metal /usr/local/bin/metal
metal -v
- name: Set envs
run: |
id=${{ matrix.CNI }}-${{ github.run_number }}
echo METRO=ny >> $GITHUB_ENV
if [[ "${{ matrix.CNI }}" == "calico-vpp" ]]; then
id=calico-${{ github.run_number }}
echo METRO=at >> $GITHUB_ENV
fi
echo CLUSTER_NAME=nsm-ci-${id} >> $GITHUB_ENV
echo SSH_KEY=nsm-ssh-${id} >> $GITHUB_ENV
- name: Find metro
run: |
metros_to_check=da,ny
if [[ "${{ matrix.CNI }}" == "calico-vpp" ]]; then
metros_to_check=at,ch
fi
METRO=$(metal capacity check -m ${metros_to_check} -P n3.xlarge.x86 -q 2 -o json | jq -r '[.[] | select( .available == true ) | .metro][0]')
if [ ${METRO} == "null" ]; then
exit 1;
fi
echo METRO=${METRO} >> $GITHUB_ENV
env:
METAL_AUTH_TOKEN: ${{ secrets.PACKET_AUTH_TOKEN }}

- name: Set up go
uses: actions/setup-go@v1
with:
go-version: 1.20.5
go-version: 1.20.11
- name: Checkout files
uses: actions/checkout@v2
with:
Expand All @@ -70,24 +91,11 @@ jobs:
- name: Install clusterctl
run: |
curl -L https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.5.2/clusterctl-linux-amd64 -o clusterctl
curl -L https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.6.2/clusterctl-linux-amd64 -o clusterctl
chmod +x ./clusterctl
mv ./clusterctl /usr/local/bin/clusterctl
clusterctl version
- name: Install metal CLI
run: |
curl -L https://github.com/equinix/metal-cli/releases/download/v0.16.0/metal-linux-amd64 -o metal
chmod +x ./metal
mv ./metal /usr/local/bin/metal
metal -v
- name: Checkout deployments
uses: actions/checkout@v2
with:
repository: networkservicemesh/deployments-k8s
path: networkservicemesh/deployments-k8s

- name: Setup ssh
working-directory: ${{ github.repository }}
id: setup_ssh
Expand Down
2 changes: 1 addition & 1 deletion scripts/setup-cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ source scripts/include/wait-pids.sh
source scripts/include/wait-start.sh

## Run clusterctl
clusterctl init --infrastructure packet:v0.7.2 || exit 1
clusterctl init --infrastructure packet:v0.8.0 || exit 1
clusterctl generate cluster ${CLUSTER_NAME} \
--kubernetes-version ${KUBERNETES_VERSION} \
--control-plane-machine-count=1 \
Expand Down

0 comments on commit 6996509

Please sign in to comment.