-
Notifications
You must be signed in to change notification settings - Fork 8
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 #262 from cloud-barista/release-v0.0.9
Merge `release-v0.0.9` branch to `main`
- Loading branch information
Showing
38 changed files
with
405 additions
and
172 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,41 @@ | ||
## This is a Dockerfile for cb-network admin-web | ||
|
||
############################################################## | ||
## Stage 1 - Go Build | ||
############################################################## | ||
|
||
FROM golang:1.17 AS builder | ||
|
||
ENV GO111MODULE=on | ||
|
||
COPY . /cb-larva | ||
|
||
WORKDIR /cb-larva/poc-cb-net/cmd/admin-web/ | ||
|
||
# Build the admin-web | ||
# Note - Using cgo write normal Go code that imports a pseudo-package "C". I may not need on cross-compiling. | ||
# Note - You can find possible platforms by 'go tool dist list' for GOOS and GOARCH | ||
# Note - Using the -ldflags parameter can help set variable values at compile time. | ||
# Note - Using the -s and -w linker flags can strip the debugging information. | ||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -ldflags '-s -w' -o admin-web | ||
|
||
############################################################# | ||
## Stage 2 - Application Setup | ||
############################################################## | ||
|
||
FROM alpine:latest | ||
|
||
WORKDIR /app | ||
|
||
RUN mkdir -p config | ||
RUN mkdir -p web | ||
|
||
# Copy the execution file | ||
COPY --from=builder /cb-larva/poc-cb-net/cmd/admin-web/admin-web . | ||
# Copy the web files of the admin-web | ||
COPY --from=builder /cb-larva/poc-cb-net/web/ ./web/ | ||
|
||
# Ports for the cb-network admin-web | ||
EXPOSE 8054 | ||
|
||
ENTRYPOINT ["./admin-web"] |
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,38 @@ | ||
## This is a Dockerfile for cb-network cladnet-service | ||
|
||
############################################################## | ||
## Stage 1 - Go Build | ||
############################################################## | ||
|
||
FROM golang:1.17 AS builder | ||
|
||
ENV GO111MODULE=on | ||
|
||
COPY . /cb-larva | ||
|
||
WORKDIR /cb-larva/poc-cb-net/cmd/service/ | ||
|
||
# Build the cladnet-service | ||
# Note - Using cgo write normal Go code that imports a pseudo-package "C". I may not need on cross-compiling. | ||
# Note - You can find possible platforms by 'go tool dist list' for GOOS and GOARCH | ||
# Note - Using the -ldflags parameter can help set variable values at compile time. | ||
# Note - Using the -s and -w linker flags can strip the debugging information. | ||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -ldflags '-s -w' -o cladnet-service | ||
|
||
############################################################# | ||
## Stage 2 - Application Setup | ||
############################################################## | ||
|
||
FROM alpine:latest | ||
|
||
WORKDIR /app | ||
|
||
RUN mkdir -p config | ||
|
||
# Copy the execution file | ||
COPY --from=builder /cb-larva/poc-cb-net/cmd/service/cladnet-service . | ||
|
||
# Ports for the cb-network cladnet-service | ||
EXPOSE 8053 | ||
|
||
ENTRYPOINT ["./cladnet-service"] |
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,90 @@ | ||
version: "3.3" | ||
services: | ||
cb-network-etcd: | ||
image: gcr.io/etcd-development/etcd:v3.5.2 | ||
container_name: etcd-gcr-v3.5.2 | ||
ports: | ||
- "2379:2379" | ||
- "2380:2380" | ||
volumes: | ||
- ./container-volume/etcd/data:/etcd-data | ||
entrypoint: | ||
- /usr/local/bin/etcd | ||
- --name | ||
- s1 | ||
- --data-dir | ||
- /etcd-data | ||
- --listen-client-urls | ||
- http://0.0.0.0:2379 | ||
- --advertise-client-urls | ||
- http://0.0.0.0:2379 | ||
- --listen-peer-urls | ||
- http://0.0.0.0:2380 | ||
- --initial-advertise-peer-urls | ||
- http://0.0.0.0:2380 | ||
- --initial-cluster | ||
- s1=http://0.0.0.0:2380 | ||
- --initial-cluster-token | ||
- tkn | ||
- --initial-cluster-state | ||
- new | ||
- --log-level | ||
- info | ||
- --logger | ||
- zap | ||
- --log-outputs | ||
- stderr | ||
healthcheck: | ||
test: /usr/local/bin/etcd --version | ||
interval: 2s | ||
timeout: 5s | ||
retries: 3 | ||
|
||
cb-network-controller: | ||
image: cloudbaristaorg/cb-network-controller:latest | ||
build: | ||
context: . | ||
dockerfile: Dockerfile-controller | ||
container_name: cb-network-controller | ||
network_mode: "host" | ||
volumes: | ||
- ./container-volume/cb-network/config:/app/config | ||
depends_on: | ||
cb-network-etcd: | ||
condition: service_healthy | ||
|
||
cb-network-cladnet-service: | ||
image: cloudbaristaorg/cb-network-cladnet-service:latest | ||
build: | ||
context: . | ||
dockerfile: Dockerfile-cladnet-service | ||
container_name: cb-network-cladnet-service | ||
ports: | ||
- "8053:8053" | ||
volumes: | ||
- ./container-volume/cb-network/config:/app/config | ||
depends_on: | ||
cb-network-etcd: | ||
condition: service_healthy | ||
healthcheck: | ||
test: nc -vz localhost 8053 | ||
interval: 2s | ||
timeout: 5s | ||
retries: 3 | ||
|
||
|
||
cb-network-admin-web: | ||
image: cloudbaristaorg/cb-network-admin-web:latest | ||
build: | ||
context: . | ||
dockerfile: Dockerfile-admin-web | ||
container_name: cb-network-admin-web | ||
ports: | ||
- "8054:8054" | ||
volumes: | ||
- ./container-volume/cb-network/config:/app/config | ||
depends_on: | ||
cb-network-etcd: | ||
condition: service_healthy | ||
cb-network-cladnet-service: | ||
condition: service_healthy |
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
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.