Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove distributed skaffold profile and chaincode* images #319

Merged
merged 7 commits into from
Oct 24, 2023
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
2 changes: 0 additions & 2 deletions .github/workflows/dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ jobs:
matrix:
dockerfile:
- orchestrator-server
- orchestrator-chaincode
- orchestrator-chaincode-init
steps:
- uses: actions/checkout@v4

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ on:
pull_request:
branches: [main]

concurrency:
concurrency:
group: "${{ github.workflow_ref }} - ${{ github.ref }} - ${{ github.event_name }}"
cancel-in-progress: true

jobs:
build:
strategy:
matrix:
images: [orchestrator-server, orchestrator-chaincode, orchestrator-chaincode-init]
images: [orchestrator-server]
uses: substra/substra-gha-workflows/.github/workflows/docker-build.yaml@main
with:
image: ${{ matrix.images }}
image: ${{ matrix.images }}
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Removed

- BREAKING: `distributed` Skaffold profile and mentions in doc ([#319](https://github.com/Substra/orchestrator/pull/319))
- BREAKING: `chaincode-init` and `chaincode` Dockerfiles ([#319](https://github.com/Substra/orchestrator/pull/319))

## [0.37.0](https://github.com/Substra/orchestrator/releases/tag/0.37.0) - 2023-10-18

### Added
Expand Down
5 changes: 1 addition & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@ pbgo = $(protobufs:.proto=.pb.go)
build_env = CGO_ENABLED=0

.PHONY: all
all: chaincode orchestrator ## Build all binaries

.PHONY: chaincode
chaincode: $(CHAINCODE_BIN) ## Build chaincode binary
all: orchestrator ## Build all binaries

.PHONY: orchestrator
orchestrator: $(ORCHESTRATOR_BIN) ## Build server binary
Expand Down
37 changes: 0 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,43 +108,6 @@ grpcurl -insecure orchestrator.org-1.com:443 list

You can also deploy [substra-backend](https://github.com/substra/substra-backend) with a `skaffold dev` or `skaffold run`

### Distributed mode

In distributed mode, the orchestrator only requires a matching chaincode.
So you need to build the chaincode image (from this repo) to be used in `hlf-k8s` in your k8s cluster.
Choose a tag (example uses `dev`).

```bash
# If you use minikube, run `eval $(minikube -p minikube docker-env)` before the `docker build` command
# If you use kind, run `kind load docker-image ghcr.io/substra/orchestrator-chaincode:dev` after the `docker build` command
# If you use k3d, run `k3d image import ghcr.io/substra/orchestrator-chaincode:dev`
docker build -f docker/orchestrator-chaincode/Dockerfile -t ghcr.io/substra/orchestrator-chaincode:dev .
docker build -f docker/orchestrator-chaincode-init/Dockerfile -t ghcr.io/substra/orchestrator-chaincode-init:dev .
```

Update hlf-k8s' values so that it uses your `dev` image instead of `latest`.

Deploy [hlf-k8s](https://github.com/substra/hlf-k8s) with a `skaffold dev` or `skaffold run`.

Then, in the orchestrator repo:

```bash
skaffold dev -p distributed
```

or
```bash
skaffold run -p distributed
```

Assuming `orchestrator.org-1.com` and `orchestrator.org-2.com` are pointing to your local k8s cluster IP (edit your `/etc/hosts` file for that), the following command should list available services:

```bash
grpcurl --cacert examples/tools/ca.crt --key examples/tools/client-org-1.key --cert examples/tools/client-org-1.crt --rpc-header 'mspid: MyOrg1MSP' --rpc-header 'channel: mychannel' --rpc-header 'chaincode: mycc' orchestrator.org-1.com:443 list
```

You can also deploy [substra-backend](https://github.com/substra/substra-backend) with a `skaffold dev -p distributed` or `skaffold run -p distributed`

### Testing

You can call the local orchestrator gRPC endpoint using [evans](https://github.com/ktr0731/evans)
Expand Down
14 changes: 0 additions & 14 deletions docker/orchestrator-chaincode-init/Dockerfile

This file was deleted.

10 changes: 0 additions & 10 deletions docker/orchestrator-chaincode-init/dependencies.json

This file was deleted.

38 changes: 0 additions & 38 deletions docker/orchestrator-chaincode/Dockerfile

This file was deleted.

18 changes: 0 additions & 18 deletions docker/orchestrator-chaincode/dependencies.json

This file was deleted.

20 changes: 0 additions & 20 deletions skaffold.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,26 +25,6 @@ manifests:
deploy:
helm: {}
profiles:
- name: distributed
patches:
- op: replace
path: /manifests/helm/releases/0/valuesFiles
value:
- examples/values/orchestrator-org-1-distributed.yaml
- op: add
path: /manifests/helm/releases/-
value:
setValueTemplates:
orchestrator.image.registry: "{{.IMAGE_DOMAIN_substra_orchestrator_server}}"
orchestrator.image.repository: "{{.IMAGE_REPO_NO_DOMAIN_substra_orchestrator_server}}"
orchestrator.image.tag: "{{.IMAGE_TAG_substra_orchestrator_server}}@{{.IMAGE_DIGEST_substra_orchestrator_server}}"
chartPath: charts/orchestrator
createNamespace: true
name: orchestrator-org-2
namespace: org-2
skipBuildDependencies: true
valuesFiles:
- examples/values/orchestrator-org-2-distributed.yaml
- name: nodeps
patches:
- op: add
Expand Down