Skip to content

Commit

Permalink
Refactor FoundationDB example to build image manually (#2089)
Browse files Browse the repository at this point in the history
* Remove foundationdb image from getting published on every merge and also during release

Signed-off-by: Akanksha Kumari <akankshakumari393@gmail.com>

* Add instructions in README to create foundationdb image manually

Signed-off-by: Akanksha Kumari <akankshakumari393@gmail.com>

* Add command to install kando in foundationDB DockerFile

Signed-off-by: Akanksha Kumari <akankshakumari393@gmail.com>

* Update examples/foundationdb/README.md

Co-authored-by: Prasad Ghangal <prasad.ghangal@gmail.com>

* Apply suggestions from code review

Co-authored-by: Pavan Navarathna <6504783+pavannd1@users.noreply.github.com>

* Apply Prasad's suggestions

Co-authored-by: Prasad Ghangal <prasad.ghangal@gmail.com>

---------

Signed-off-by: Akanksha Kumari <akankshakumari393@gmail.com>
Co-authored-by: Prasad Ghangal <prasad.ghangal@gmail.com>
Co-authored-by: Pavan Navarathna <6504783+pavannd1@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
4 people committed Jun 8, 2023
1 parent 94448f6 commit 1dee05c
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 8 deletions.
5 changes: 0 additions & 5 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,6 @@ dockers:
image_templates:
- 'ghcr.io/kanisterio/couchbase-tools:{{ .Tag }}'
dockerfile: 'docker/couchbase-tools/Dockerfile'
- ids:
- kando
image_templates:
- 'ghcr.io/kanisterio/foundationdb:{{ .Tag }}'
dockerfile: 'docker/foundationdb/Dockerfile'
- image_templates:
- 'ghcr.io/kanisterio/kafka-adobe-s3-source-connector:{{ .Tag }}'
dockerfile: 'docker/kafka-adobes3Connector/image/adobeSource.Dockerfile'
Expand Down
2 changes: 1 addition & 1 deletion build/push_images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ set -o errexit
set -o nounset

IMAGE_REGISTRY="ghcr.io/kanisterio"
IMAGES=("mysql-sidecar" "kafka-adobe-s3-sink-connector" "postgres-kanister-tools" "postgresql" "cassandra" "kanister-kubectl-1.18" "mongo-sidecar" "mongodb" "es-sidecar" "controller" "kanister-tools" "couchbase-tools" "kafka-adobe-s3-source-connector" "foundationdb" "mssql-tools")
IMAGES=("mysql-sidecar" "kafka-adobe-s3-sink-connector" "postgres-kanister-tools" "postgresql" "cassandra" "kanister-kubectl-1.18" "mongo-sidecar" "mongodb" "es-sidecar" "controller" "kanister-tools" "couchbase-tools" "kafka-adobe-s3-source-connector" "mssql-tools")

TAG=${1:-"v9.99.9-dev"}

Expand Down
2 changes: 1 addition & 1 deletion docker/foundationdb/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ FROM foundationdb/foundationdb:6.2.20
MAINTAINER "Tom Manville <tom@kasten.io>"

# Install kando
ADD kando /usr/local/bin/
RUN curl https://raw.githubusercontent.com/kanisterio/kanister/master/scripts/get.sh | bash
20 changes: 20 additions & 0 deletions examples/foundationdb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,22 @@ on you cluster.
* Kubernetes 1.9+ with Beta APIs enabled.
* PV support on the underlying infrastructure.
* Kanister version 0.92.0 with `profiles.cr.kanister.io` CRD installed.
* Docker CLI installed
* A docker image containing the required tools to back up FoundationDB.
The Dockerfile for the image can be found [here](https://raw.githubusercontent.com/kanisterio/kanister/master/docker/foundationdb/Dockerfile).
To build and push the docker image to your registry, execute [these](#build-docker-image) steps.

### Build docker image

Execute the commands below to build and push the `foundationdb` docker image to a registry.
```bash
# Clone Kanister Github repo locally
$ git clone https://github.com/kanisterio/kanister.git <path_to_kanister>

# Build FoundationDB docker image
$ docker build -t <registry>/<repository>/foundationdb:<tag_name> <path_to_kanister>/docker/foundationdb
$ docker push <registry>/<repository>/foundationdb:<tag_name>
```

# Installation

Expand Down Expand Up @@ -58,6 +74,10 @@ cluster.

Please follow below command to create the CR, please make sure to use the local_cluster.yaml file from this repo.

**NOTE:**

Replace `<registry>`, `<repository>` and `<tag_name>` for the `imageName` value in `./local_cluster.yaml` before running the following command.

```bash
$ kubectl create -f local_cluster.yaml
```
Expand Down
2 changes: 1 addition & 1 deletion examples/foundationdb/local_cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ spec:
secret:
secretName: fdb-kubernetes-operator-secrets
mainContainer:
imageName: ghcr.io/kanisterio/foundationdb
imageName: <registry>/<repository>/foundationdb:<tag_name>
enableTls: true
env:
- name: FDB_TLS_CERTIFICATE_FILE
Expand Down

0 comments on commit 1dee05c

Please sign in to comment.