Skip to content

Commit

Permalink
New nodejs base image
Browse files Browse the repository at this point in the history
  • Loading branch information
upalatucci committed Oct 23, 2023
1 parent ade5b3b commit 5532f57
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 66 deletions.
36 changes: 0 additions & 36 deletions .github/workflows/deploy.yml

This file was deleted.

8 changes: 2 additions & 6 deletions .github/workflows/on_pull_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ jobs:

- name: Build
run: yarn build

e2e-tests:
name: Run e2e tests
runs-on: ubuntu-latest
Expand All @@ -62,12 +63,7 @@ jobs:
sudo install kubectl /usr/local/bin/kubectl
- name: Install podman
run: |
curl -LO https://github.com/containers/podman/releases/download/v3.4.4/podman-remote-static.tar.gz
tar -xvf podman-remote-static.tar.gz
sudo install podman-remote-static /usr/local/bin/podman
curl -O http://archive.ubuntu.com/ubuntu/pool/universe/g/golang-github-containernetworking-plugins/containernetworking-plugins_1.1.1+ds1-1_amd64.deb
sudo dpkg -i containernetworking-plugins_1.1.1+ds1-1_amd64.deb
sudo apt-get -y install podman
- name: Create Cluster
run: |
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Builder container
FROM registry.access.redhat.com/ubi9/nodejs-18 AS build
FROM registry.ci.openshift.org/ocp/builder:rhel-8-base-nodejs-openshift-4.15 AS build

# Install yarn
RUN npm install -g yarn -s &>/dev/null
Expand Down
44 changes: 21 additions & 23 deletions scripts/deploy-cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,28 +41,28 @@ echo "Found: ${CONTAINER_CMD}"

# Starting local registry and temp data dir
# ---------------------------------------------
echo ""
echo "Starting local registry and tmp local storage"
echo "=============================================="
# echo ""
# echo "Starting local registry and tmp local storage"
# echo "=============================================="

reg_name='kind-registry'
reg_port='5001'
# reg_name='kind-registry'
# reg_port='5001'

# Create the kind network
${CONTAINER_CMD} network create kind --driver bridge
${CONTAINER_CMD} network ls
# # Create the kind network
# ${CONTAINER_CMD} network create kind
# ${CONTAINER_CMD} network ls

# Create the registry
if [ "$(${CONTAINER_CMD} inspect -f {{.State.Running}} "${reg_name}" 2>/dev/null || true)" != 'true' ]; then
${CONTAINER_CMD} run \
-d --restart=always -p "127.0.0.1:${reg_port}:5000" --name "${reg_name}" --net kind \
registry:2
fi
reg_ip=$(${CONTAINER_CMD} inspect -f {{.NetworkSettings.Networks.kind.IPAddress}} ${reg_name})
# # Create the registry
# if [ "$(${CONTAINER_CMD} inspect -f {{.State.Running}} "${reg_name}" 2>/dev/null || true)" != 'true' ]; then
# ${CONTAINER_CMD} run \
# -d --restart=always -p "127.0.0.1:${reg_port}:5000" --name "${reg_name}" --net kind \
# registry:2
# fi
# reg_ip=$(${CONTAINER_CMD} inspect -f {{.NetworkSettings.Networks.kind.IPAddress}} ${reg_name})

echo "reg_name: ${reg_name}"
echo "reg_port: ${reg_port} (localhost, http://localhost:${reg_port})"
echo "reg_ip: ${reg_ip} (cluster, http://${reg_ip}:5000)"
# echo "reg_name: ${reg_name}"
# echo "reg_port: ${reg_port} (localhost, http://localhost:${reg_port})"
# echo "reg_ip: ${reg_ip} (cluster, http://${reg_ip}:5000)"

# Create tmp storage dir
host_path=$(mktemp -d -t kind-storage-XXXXX)
Expand Down Expand Up @@ -95,10 +95,6 @@ nodes:
containerPath: /data
- role: worker
- role: worker
containerdConfigPatches:
- |-
[plugins."io.containerd.grpc.v1.cri".registry.mirrors."localhost:${reg_port}"]
endpoint = ["http://${reg_ip}:5000"]
EOF

# Install Openshift console
Expand Down Expand Up @@ -156,7 +152,7 @@ echo "==========================================="
echo ""
echo "Routes:"
echo " server: https://127.0.0.1:6443/"
echo " registry: http://localhost:${reg_port}/"
# echo " registry: http://localhost:${reg_port}/"
echo " web console: http://localhost:30080/"

echo ""
Expand All @@ -174,3 +170,5 @@ echo "if needed copy the kubernetes config file to your local home directory, or
echo "use the KUBECONFIG environment variable to point to the new config file."
echo "For example:"
echo " cp <home directory of user running this script>/config ~/.kube/config"

bash ${script_dir}/build-and-push-images.sh
4 changes: 4 additions & 0 deletions scripts/yaml/nmstate.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: nmstate.io/v1
kind: NMState
metadata:
name: nmstate

0 comments on commit 5532f57

Please sign in to comment.