Skip to content

Commit

Permalink
chore: remove distributed skaffold profile and chaincode* images (#…
Browse files Browse the repository at this point in the history
…319)

# Issue

FL-1237

# Description

* Removed `distributed` Skaffold profile and mentions in `README.md`
* Removed `chaincode-init` and `chaincode` docker images and workflows

## Checklist

- [x] [changelog](../CHANGELOG.md) was updated with notable changes
- [x] documentation was updated

## Needs

owkin/substra-ci#133
Substra/substra-documentation#379

## Related 

Substra/substra-backend#768

---------

Signed-off-by: Thibault Camalon <135698225+thbcmlowk@users.noreply.github.com>
  • Loading branch information
thbcmlowk authored Oct 24, 2023
1 parent 9e224b9 commit 5dc63d4
Show file tree
Hide file tree
Showing 10 changed files with 9 additions and 146 deletions.
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 @@ -109,43 +109,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

0 comments on commit 5dc63d4

Please sign in to comment.