Skip to content

Commit

Permalink
fix various configs
Browse files Browse the repository at this point in the history
  • Loading branch information
motoki317 committed Dec 21, 2023
1 parent ce80dc1 commit d8cb423
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 37 deletions.
10 changes: 5 additions & 5 deletions .local-dev/ext-builder/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ Join external builder instance from outside the production (cluster) deployment

## Usage

1. Set `./id_ed25519` (ns default private key for fetching repository) and config `./config.yaml` accordingly
- Fetch configuration from production if necessary
2. Set secret information in `.env` file according to `compose.yaml`
3. `ssh -L 0.0.0.0:3306:private.kmbk.tokyotech.org:3306 -L 0.0.0.0:10000:10.43.193.98:10000 c1-203`
- Do this if some ports are unreachable from outside the deployment stack
1. Set config `./config.yaml` accordingly
- Fetch configuration from production if necessary
2. Set token (`NS_COMPONENTS_CONTROLLER_TOKEN`) in `.env` file
3. Prepare local forward if controller port is unreachable from the internet
- `ssh -L 0.0.0.0:10000:10.43.193.98:10000 c1-203`
4. `docker compose pull`
5. `docker compose up -d`
11 changes: 6 additions & 5 deletions .local-dev/ext-builder/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,31 @@ services:
command: --debug --loglevel=trace --config=/config.yaml
restart: always
environment:
NS_DB_PASSWORD:
NS_STORAGE_S3_ACCESSKEY:
NS_STORAGE_S3_ACCESSSECRET:
NS_IMAGE_REGISTRY_PASSWORD:
NS_COMPONENTS_CONTROLLER_TOKEN:
volumes:
- /var/run/docker.sock:/var/run/docker.sock # for buildpack docker backend
- ./id_ed25519:/keys/id_ed25519
- ./config.yaml:/config.yaml
- ~/.ssh/known_hosts:/root/.ssh/known_hosts
depends_on:
buildkitd:
condition: service_started
extra_hosts:
- host.docker.internal:host-gateway
- registry.local:host-gateway

buildpack:
image: paketobuildpacks/builder-jammy-full:latest
restart: always
entrypoint:
- sleep
- infinity
extra_hosts:
- registry.local:host-gateway

buildkitd:
image: moby/buildkit:latest
restart: always
privileged: true
command: --addr tcp://0.0.0.0:1234
extra_hosts:
- registry.local:host-gateway
27 changes: 0 additions & 27 deletions .local-dev/ext-builder/config.yaml
Original file line number Diff line number Diff line change
@@ -1,30 +1,3 @@
privateKeyFile: /keys/id_ed25519
adminerURL: https://adminer.ns.trap.jp/

db:
host: host.docker.internal
port: 3306
username: service_neoshowcase
# password: <env secret>
database: service_neoshowcase

storage:
type: s3
s3:
bucket: neoshowcase
# accessKey: <env secret>
# accessSecret: <env secret>
region: ap-northeast-1
endpoint: https://s3.ap-northeast-1.wasabisys.com

image:
registry:
scheme: https
addr: registry.ns.trap.jp
username: "robot$neoshowcase"
# password: <env secret>
namePrefix: ns-apps/

components:
builder:
buildkit:
Expand Down
1 change: 1 addition & 0 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ services:
- ./.local-dev/config/ns.yaml:/config.yaml
- ./.local-dev/local-storage:/data
- ./.local-dev/keys:/keys
- ~/.ssh/known_hosts:/root/.ssh/known_hosts
labels:
- "traefik.enable=true"
- "traefik.http.routers.ns-gateway.rule=Host(`ns.local.trapti.tech`) && PathPrefix(`/neoshowcase.protobuf.APIService`)"
Expand Down

0 comments on commit d8cb423

Please sign in to comment.