Skip to content

Commit

Permalink
refactor(all): rename base to core (#375)
Browse files Browse the repository at this point in the history
Because

- Instill Base is going to be promoted to Instill Core

This commit

- refactor and rename all `base` to `core`
  • Loading branch information
pinglin authored Oct 22, 2023
1 parent c1dc507 commit 42fa828
Show file tree
Hide file tree
Showing 18 changed files with 238 additions and 225 deletions.
23 changes: 5 additions & 18 deletions .env
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# docker compose project name
COMPOSE_PROJECT_NAME=instill-vdp

# system-wise config path (all base, vdp, and model projects must use the same path)
SYSTEM_CONFIG_PATH=~/.config/instill
# system-wise config path (all core, vdp, and model projects must use the same path)
SYSTEM_CONFIG_PATH=$(HOME)/.config/instill

# configuration directory path for docker build
BUILD_CONFIG_DIR_PATH=.
Expand All @@ -26,13 +26,13 @@ COMPOSE_DOCKER_CLI_BUILD=1
# version
ALPINE_VERSION=3.16

GOLANG_VERSION=1.19.3
GOLANG_VERSION=1.21
KRAKEND_CE_VERSION=2.1.3
ARTIVC_VERSION=0.10.0
K6_VERSION=0.44.0

# Instill Base
INSTILL_BASE_VERSION=0.4.1-alpha
# Instill Core
INSTILL_CORE_VERSION=0.4.1-alpha

# api-gateway
API_GATEWAY_HOST=api-gateway
Expand All @@ -53,10 +53,6 @@ CONNECTOR_BACKEND_HOST=connector-backend
CONNECTOR_BACKEND_PRIVATEPORT=3082
CONNECTOR_BACKEND_PUBLICPORT=8082

# model-backend
MODEL_BACKEND_HOST=model-backend
MODEL_BACKEND_PUBLICPORT=8083

# mgmt-backend
MGMT_BACKEND_HOST=mgmt-backend
MGMT_BACKEND_PRIVATEPORT=3084
Expand Down Expand Up @@ -87,17 +83,8 @@ REDIS_PORT=6379
ETCD_HOST=etcd
ETCD_CLIENT_PORT=3379

# influxdb
INFLUXDB_HOST=influxdb
INFLUXDB_PORT=8086

# otel
OTEL_COLLECTOR_PORT=8095
OTEL_COLLECTOR_PROMETHEUS_PORT=9001

# jaeger
JAEGER_HOST=jaeger
JAEGER_LISTEN_THRIFT_PORT=14268 # accept jaeger.thrift directly from clients

# Temopral
TEMPORAL_ADMIN_TOOLS_IMAGE=temporalio/admin-tools
Expand Down
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ $ make latest PROFILE=all
The env variable `PROFILE` is intended to specify which service component you want to develop on
- `all`

When you set `PROFILE=all`, the whole `Instill Base` and `Instill VDP` stack will be launched, meaning you want to test the system as a whole
When you set `PROFILE=all`, the whole `Instill Core` and `Instill VDP` stack will be launched, meaning you want to test the system as a whole

- `{service}`

Expand Down
106 changes: 53 additions & 53 deletions .github/workflows/helm-integration-test-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,35 +46,35 @@ jobs:
run: |
curl https://github.com/grafana/k6/releases/download/v${{ env.K6_VERSION }}/k6-v${{ env.K6_VERSION }}-linux-amd64.tar.gz -L | tar xvz --strip-components 1 && sudo cp k6 /usr/bin
- name: Checkout repo (base)
- name: Checkout repo (core)
uses: actions/checkout@v3
with:
repository: instill-ai/base
repository: instill-ai/core

- name: Load .env file (base)
- name: Load .env file (core)
uses: cardinalby/export-env-action@v2
with:
envFile: .env

- name: Launch Helm Instill Base (latest)
- name: Launch Helm Instill Core (latest)
run: |
helm install base charts/base --namespace instill-ai --create-namespace \
helm install core charts/core --namespace instill-ai --create-namespace \
--set edition=k8s-ce:test \
--set apiGateway.image.tag=latest \
--set mgmtBackend.image.tag=latest \
--set console.image.tag=latest \
--set tags.observability=false
- name: Wait for base pods up
- name: Wait for core pods up
run: |
while [[ $(kubectl get pods --namespace instill-ai -l "app.kubernetes.io/component=api-gateway,app.kubernetes.io/instance=base" -o 'jsonpath={..status.phase}') != *"Running"* ]]; do
while [[ $(kubectl get pods --namespace instill-ai -l "app.kubernetes.io/component=api-gateway,app.kubernetes.io/instance=core" -o 'jsonpath={..status.phase}') != *"Running"* ]]; do
echo "$(kubectl get pods --namespace instill-ai)"
sleep 10
done
- name: Port-forward of api-gateway
run: |
API_GATEWAY_POD_NAME=$(kubectl get pods --namespace instill-ai -l "app.kubernetes.io/component=api-gateway,app.kubernetes.io/instance=base" -o json | jq -r '.items[0].metadata.name')
API_GATEWAY_POD_NAME=$(kubectl get pods --namespace instill-ai -l "app.kubernetes.io/component=api-gateway,app.kubernetes.io/instance=core" -o json | jq -r '.items[0].metadata.name')
kubectl --namespace instill-ai port-forward ${API_GATEWAY_POD_NAME} ${API_GATEWAY_PORT}:${API_GATEWAY_PORT} > /dev/null 2>&1 &
while ! nc -vz localhost ${API_GATEWAY_PORT} > /dev/null 2>&1; do sleep 1; done
Expand Down Expand Up @@ -110,7 +110,7 @@ jobs:
helm-integration-test-latest-mac:
if: inputs.target == 'latest' && github.ref == 'refs/heads/main'
runs-on: [self-hosted,macOS,vdp]
runs-on: [self-hosted, macOS, vdp]
steps:
- name: Set up environment
run: |
Expand Down Expand Up @@ -148,48 +148,48 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v3
with:
repository: instill-ai/base
repository: instill-ai/core

- name: Load .env file
uses: cardinalby/export-env-action@v2
with:
envFile: .env

- name: Check if Base Helm release exists
id: check-base-helm-release
- name: Check if Core Helm release exists
id: check-core-helm-release
run: |
if helm ls -n instill-ai | grep -q 'base'; then
echo "Helm release 'base' found."
if helm ls -n instill-ai | grep -q 'core'; then
echo "Helm release 'core' found."
echo "release_exists=true" >> $GITHUB_OUTPUT
else
echo "Helm release 'base' not found."
echo "Helm release 'core' not found."
fi
- name: Uninstall Base Helm Release
if: steps.check-base-helm-release.outputs.release_exists == 'true'
- name: Uninstall Core Helm Release
if: steps.check-core-helm-release.outputs.release_exists == 'true'
run: |
helm uninstall base --namespace instill-ai
helm uninstall core --namespace instill-ai
kubectl delete namespace instill-ai
- name: Launch Helm Instill Base (latest)
- name: Launch Helm Instill Core (latest)
run: |
helm install base charts/base --namespace instill-ai --create-namespace \
helm install core charts/core --namespace instill-ai --create-namespace \
--set edition=k8s-ce:test \
--set apiGateway.image.tag=latest \
--set mgmtBackend.image.tag=latest \
--set console.image.tag=latest \
--set tags.observability=false
- name: Wait for base pods up
- name: Wait for core pods up
run: |
while [[ $(kubectl get pods --namespace instill-ai -l "app.kubernetes.io/component=api-gateway,app.kubernetes.io/instance=base" -o 'jsonpath={..status.phase}') != *"Running"* ]]; do
while [[ $(kubectl get pods --namespace instill-ai -l "app.kubernetes.io/component=api-gateway,app.kubernetes.io/instance=core" -o 'jsonpath={..status.phase}') != *"Running"* ]]; do
echo "$(kubectl get pods --namespace instill-ai)"
sleep 10
done
- name: Port-forward of api-gateway
run: |
API_GATEWAY_POD_NAME=$(kubectl get pods --namespace instill-ai -l "app.kubernetes.io/component=api-gateway,app.kubernetes.io/instance=base" -o json | jq -r '.items[0].metadata.name')
API_GATEWAY_POD_NAME=$(kubectl get pods --namespace instill-ai -l "app.kubernetes.io/component=api-gateway,app.kubernetes.io/instance=core" -o json | jq -r '.items[0].metadata.name')
kubectl --namespace instill-ai port-forward ${API_GATEWAY_POD_NAME} ${API_GATEWAY_PORT}:${API_GATEWAY_PORT} > /dev/null 2>&1 &
while ! nc -vz localhost ${API_GATEWAY_PORT} > /dev/null 2>&1; do sleep 1; done
Expand Down Expand Up @@ -224,11 +224,11 @@ jobs:
cd ${{ inputs.component }}
make integration-test API_GATEWAY_URL=localhost:${API_GATEWAY_PORT}
- name: Uninstall Base and VDP Helm Release
- name: Uninstall Core and VDP Helm Release
run: |
helm uninstall vdp --namespace instill-ai
helm uninstall base --namespace instill-ai
kubectl delete namespace instill-ai
helm uninstall core --namespace instill-ai
kubectl delete namespace instill-ai
helm-integration-test-release-linux:
if: inputs.target == 'release'
Expand Down Expand Up @@ -265,35 +265,35 @@ jobs:
run: |
curl https://github.com/grafana/k6/releases/download/v${{ env.K6_VERSION }}/k6-v${{ env.K6_VERSION }}-linux-amd64.tar.gz -L | tar xvz --strip-components 1 && sudo cp k6 /usr/bin
- name: Checkout repo (base)
- name: Checkout repo (core)
uses: actions/checkout@v3
with:
repository: instill-ai/base
repository: instill-ai/core

- name: Load .env file (base)
- name: Load .env file (core)
uses: cardinalby/export-env-action@v2
with:
envFile: .env

- name: Launch Helm Instill Base (release)
- name: Launch Helm Instill Core (release)
run: |
helm install base charts/base --namespace instill-ai --create-namespace \
helm install core charts/core --namespace instill-ai --create-namespace \
--set edition=k8s-ce:test \
--set mgmtBackend.image.tag=${MGMT_BACKEND_VERSION} \
--set apiGateway.image.tag=${API_GATEWAY_VERSION} \
--set tags.observability=false \
--set tags.prometheusStack=false
--set tags.prometheusStack=false
- name: Wait for base pods up
- name: Wait for core pods up
run: |
while [[ $(kubectl get pods --namespace instill-ai -l "app.kubernetes.io/component=api-gateway,app.kubernetes.io/instance=base" -o 'jsonpath={..status.phase}') != *"Running"* ]]; do
while [[ $(kubectl get pods --namespace instill-ai -l "app.kubernetes.io/component=api-gateway,app.kubernetes.io/instance=core" -o 'jsonpath={..status.phase}') != *"Running"* ]]; do
echo "$(kubectl get pods --namespace instill-ai)"
sleep 10
done
- name: Port-forward of api-gateway
run: |
API_GATEWAY_POD_NAME=$(kubectl get pods --namespace instill-ai -l "app.kubernetes.io/component=api-gateway,app.kubernetes.io/instance=base" -o json | jq -r '.items[0].metadata.name')
API_GATEWAY_POD_NAME=$(kubectl get pods --namespace instill-ai -l "app.kubernetes.io/component=api-gateway,app.kubernetes.io/instance=core" -o json | jq -r '.items[0].metadata.name')
kubectl --namespace instill-ai port-forward ${API_GATEWAY_POD_NAME} ${API_GATEWAY_PORT}:${API_GATEWAY_PORT} > /dev/null 2>&1 &
while ! nc -vz localhost ${API_GATEWAY_PORT} > /dev/null 2>&1; do sleep 1; done
Expand Down Expand Up @@ -335,7 +335,7 @@ jobs:
helm-integration-test-release-mac:
if: inputs.target == 'release'
runs-on: [self-hosted,macOS,vdp]
runs-on: [self-hosted, macOS, vdp]
steps:
- name: Set up environment
run: |
Expand Down Expand Up @@ -373,48 +373,48 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v3
with:
repository: instill-ai/base
repository: instill-ai/core

- name: Load .env file
uses: cardinalby/export-env-action@v2
with:
envFile: .env

- name: Check if Base Helm release exists
id: check-base-helm-release
- name: Check if Core Helm release exists
id: check-core-helm-release
run: |
if helm ls -n instill-ai | grep -q 'base'; then
echo "Helm release 'base' found."
if helm ls -n instill-ai | grep -q 'core'; then
echo "Helm release 'core' found."
echo "release_exists=true" >> $GITHUB_OUTPUT
else
echo "Helm release 'base' not found."
echo "Helm release 'core' not found."
fi
- name: Uninstall Base Helm Release
if: steps.check-base-helm-release.outputs.release_exists == 'true'
- name: Uninstall Core Helm Release
if: steps.check-core-helm-release.outputs.release_exists == 'true'
run: |
helm uninstall base --namespace instill-ai
helm uninstall core --namespace instill-ai
kubectl delete namespace instill-ai
- name: Launch Helm Instill Base (release)
- name: Launch Helm Instill Core (release)
run: |
helm install base charts/base --namespace instill-ai --create-namespace \
helm install core charts/core --namespace instill-ai --create-namespace \
--set edition=k8s-ce:test \
--set apiGateway.image.tag=${API_GATEWAY_VERSION} \
--set mgmtBackend.image.tag=${MGMT_BACKEND_VERSION} \
--set tags.observability=false \
--set tags.prometheusStack=false
- name: Wait for base pods up
- name: Wait for core pods up
run: |
while [[ $(kubectl get pods --namespace instill-ai -l "app.kubernetes.io/component=api-gateway,app.kubernetes.io/instance=base" -o 'jsonpath={..status.phase}') != *"Running"* ]]; do
while [[ $(kubectl get pods --namespace instill-ai -l "app.kubernetes.io/component=api-gateway,app.kubernetes.io/instance=core" -o 'jsonpath={..status.phase}') != *"Running"* ]]; do
echo "$(kubectl get pods --namespace instill-ai)"
sleep 10
done
- name: Port-forward of base-api-gateway
- name: Port-forward of core-api-gateway
run: |
API_GATEWAY_POD_NAME=$(kubectl get pods --namespace instill-ai -l "app.kubernetes.io/component=api-gateway,app.kubernetes.io/instance=base" -o json | jq -r '.items[0].metadata.name')
API_GATEWAY_POD_NAME=$(kubectl get pods --namespace instill-ai -l "app.kubernetes.io/component=api-gateway,app.kubernetes.io/instance=core" -o json | jq -r '.items[0].metadata.name')
kubectl --namespace instill-ai port-forward ${API_GATEWAY_POD_NAME} ${API_GATEWAY_PORT}:${API_GATEWAY_PORT} > /dev/null 2>&1 &
while ! nc -vz localhost ${API_GATEWAY_PORT} > /dev/null 2>&1; do sleep 1; done
Expand Down Expand Up @@ -455,8 +455,8 @@ jobs:
cd ${{ inputs.component }}
make integration-test API_GATEWAY_URL=localhost:${API_GATEWAY_PORT}
- name: Uninstall Base and VDP Helm Release
- name: Uninstall Core and VDP Helm Release
run: |
helm uninstall vdp --namespace instill-ai
helm uninstall base --namespace instill-ai
helm uninstall core --namespace instill-ai
kubectl delete namespace instill-ai
Loading

0 comments on commit 42fa828

Please sign in to comment.