Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ docs/plans
*-results.xml
dist
control-plane
pgedge-control-plane
!docker/control-plane
e2e/debug
4 changes: 2 additions & 2 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
version: 2
project_name: control-plane
project_name: pgedge-control-plane
builds:
- main: ./server
binary: control-plane
binary: pgedge-control-plane
env:
- CGO_ENABLED=0
goos:
Expand Down
16 changes: 8 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -258,12 +258,12 @@ control-plane-images:
goreleaser-build:
GORELEASER_CURRENT_TAG=$(CONTROL_PLANE_VERSION) \
$(goreleaser) build --snapshot --clean
tar -C dist/control-plane_linux_amd64_v1 -c -z \
-f dist/control-plane_$(CONTROL_PLANE_VERSION:v%=%)_linux_amd64.tar.gz \
control-plane
tar -C dist/control-plane_linux_arm64_v8.0 -c -z \
-f dist/control-plane_$(CONTROL_PLANE_VERSION:v%=%)_linux_arm64.tar.gz \
control-plane
tar -C dist/pgedge-control-plane_linux_amd64_v1 -c -z \
-f dist/pgedge-control-plane_$(CONTROL_PLANE_VERSION:v%=%)_linux_amd64.tar.gz \
pgedge-control-plane
tar -C dist/pgedge-control-plane_linux_arm64_v8.0 -c -z \
-f dist/pgedge-control-plane_$(CONTROL_PLANE_VERSION:v%=%)_linux_arm64.tar.gz \
pgedge-control-plane

goreleaser-test-release:
GORELEASER_CURRENT_TAG=$(CONTROL_PLANE_VERSION) \
Expand Down Expand Up @@ -332,7 +332,7 @@ build: dev-build
dev-build:
GOOS=linux go build \
-gcflags "all=-N -l" \
-o docker/control-plane-dev/control-plane \
-o docker/control-plane-dev/pgedge-control-plane \
$(shell pwd)/server

.PHONY: docker-swarm-init
Expand Down Expand Up @@ -397,7 +397,7 @@ api-docs:
ci-compose-build:
GOOS=linux go build \
-gcflags "all=-N -l" \
-o docker/control-plane-ci/control-plane \
-o docker/control-plane-ci/pgedge-control-plane \
$(shell pwd)/server

.PHONY: ci-compose-detached
Expand Down
4 changes: 2 additions & 2 deletions docker/control-plane-ci/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ RUN apt-get update && \
apt-get install -y curl && \
rm -rf /var/lib/apt/lists/*

COPY ./control-plane /control-plane
COPY ./pgedge-control-plane /pgedge-control-plane

ENTRYPOINT ["/control-plane"]
ENTRYPOINT ["/pgedge-control-plane"]
2 changes: 1 addition & 1 deletion docker/control-plane-dev/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ ENV CGO_ENABLED=0
RUN go install github.com/go-delve/delve/cmd/dlv@latest

COPY ./entrypoint.sh /entrypoint.sh
COPY ./control-plane /control-plane
COPY ./pgedge-control-plane /pgedge-control-plane

ENTRYPOINT [ "/entrypoint.sh" ]
4 changes: 2 additions & 2 deletions docker/control-plane-dev/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ services:
watch:
- path: ./Dockerfile
action: rebuild
- path: ./control-plane
- path: ./pgedge-control-plane
action: sync+restart
target: /control-plane
target: /pgedge-control-plane
working_dir: ${WORKSPACE_DIR}
environment:
- DEBUG=${DEBUG:-0}
Expand Down
4 changes: 2 additions & 2 deletions docker/control-plane-dev/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ if [[ "${DEBUG}" == 1 ]]; then
--log-output=debugger,debuglineerr,gdbwire,lldbout,rpc \
--accept-multiclient \
--api-version=2 \
exec /control-plane \
exec /pgedge-control-plane \
-- \
run \
--config-path /config.json \
--logging.pretty
else
exec /control-plane run \
exec /pgedge-control-plane run \
--config-path /config.json \
--logging.pretty
fi
4 changes: 2 additions & 2 deletions docker/control-plane/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ ARG TARGETOS
ARG TARGETARCH
ARG ARCHIVE_VERSION

ENTRYPOINT ["/control-plane"]
ENTRYPOINT ["/pgedge-control-plane"]

ADD control-plane_${ARCHIVE_VERSION}_${TARGETOS}_${TARGETARCH}.tar.gz /
ADD pgedge-control-plane_${ARCHIVE_VERSION}_${TARGETOS}_${TARGETARCH}.tar.gz /
14 changes: 9 additions & 5 deletions docs/development/running-locally.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,17 @@ On MacOS, the full path to the Restish configuration file is `~/Library/Applicat

## Running the Control Plane

To start the Control Plane instances, navigate into the `control-plane` repository root and run:
To start the Control Plane instances, navigate into the `control-plane`
repository root and run:

```sh
make dev-watch
```

This will build a `control-plane` binary, build the Docker image in `docker/control-plane-dev`, and run the Docker Compose configuration in `watch` mode. See the [Development workflow](#development-workflow) section to learn how to use this setup for development.
This will build a `pgedge-control-plane` binary, build the Docker image in
`docker/control-plane-dev`, and run the Docker Compose configuration in `watch`
mode. See the [Development workflow](#development-workflow) section to learn how
to use this setup for development.

## Interact with the Control Plane API

Expand Down Expand Up @@ -199,11 +203,11 @@ section to reinitialize your cluster.

The following sections detail the steps in the development process.

### Rebuilding the `control-plane` binary
### Rebuilding the `pgedge-control-plane` binary

The Docker Compose file is configured to watch for changes to the
`control-plane` binary. You can update the binary in the running containers by
running:
`pgedge-control-plane` binary. You can update the binary in the running
containers by running:

```sh
make dev-build
Expand Down
2 changes: 1 addition & 1 deletion e2e/fixtures/roles/build_image/vars/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ _arch_transform:
x86_64: amd64
aarch64: arm64
arm64: arm64
_archive_name: control-plane_{{ version }}_linux_{{ _arch_transform[architecture] }}.tar.gz
_archive_name: pgedge-control-plane_{{ version }}_linux_{{ _arch_transform[architecture] }}.tar.gz