Skip to content
This repository has been archived by the owner on Nov 21, 2023. It is now read-only.

Commit

Permalink
Merge branch 'main' into FLU-327
Browse files Browse the repository at this point in the history
  • Loading branch information
nahsi committed Jun 9, 2023
2 parents ca33894 + b1326da commit 986a58d
Show file tree
Hide file tree
Showing 23 changed files with 1,582 additions and 1,651 deletions.
2 changes: 1 addition & 1 deletion .github/release-please/manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.1.21"
".": "0.1.23"
}
8 changes: 5 additions & 3 deletions .github/workflows/container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
image:
description: "image name"
type: string
default: "fluencelabs/rust-peer"
default: "fluencelabs/nox"
version:
description: "version set as part of container tag"
type: string
Expand Down Expand Up @@ -120,6 +120,8 @@ jobs:
tags: |
${{ inputs.image }}:latest
${{ inputs.image }}:${{ env.RELEASE_VERSION }}
fluencelabs/rust-peer:latest
fluencelabs/rust-peer:${{ env.RELEASE_VERSION }}
labels: |
org.opencontainers.image.version=${{ env.RELEASE_VERSION }}
org.opencontainers.image.created=${{ env.BUILD_DATE }}
Expand All @@ -133,13 +135,13 @@ jobs:
with:
username: ${{ env.DOCKER_USERNAME }}
password: ${{ env.DOCKER_PASSWORD }}
repository: fluencelabs/rust-peer
repository: fluencelabs/nox

- name: Print results to check summary
if: always()
run: |
cat <<'SNAPSHOT' >> $GITHUB_STEP_SUMMARY
## rust-peer ${{ inputs.flavour }}
## nox ${{ inputs.flavour }}
digest: `${{ steps.docker.outputs.digest }}`
```
${{ inputs.image }}:${{ inputs.flavour }}
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,24 +77,24 @@ jobs:
## Docker tags
### ipfs
Contains Fluence rust-peer and builtin IPFS deaemon.
Contains Fluence nox and builtin IPFS deaemon.
fluencelabs/rust-peer:latest
fluencelabs/rust-peer:${{ env.RELEASE_VERSION }}
fluencelabs/rust-peer:ipfs
fluencelabs/rust-peer:ipfs_${{ env.RELEASE_VERSION }}
fluencelabs/nox:latest
fluencelabs/nox:${{ env.RELEASE_VERSION }}
fluencelabs/nox:ipfs
fluencelabs/nox:ipfs_${{ env.RELEASE_VERSION }}
## minimal
Contains Fluence rust-peer only.
Contains Fluence nox only.
fluencelabs/rust-peer:minimal
fluencelabs/rust-peer:minimal_${{ env.RELEASE_VERSION }}
fluencelabs/nox:minimal
fluencelabs/nox:minimal_${{ env.RELEASE_VERSION }}
## rich
Contains Fluence rust-peer, IPFS, ceramic cli, bitcoin cli and geth cli.
Contains Fluence nox, IPFS, ceramic cli, bitcoin cli and geth cli.
fluencelabs/rust-peer:rich
fluencelabs/rust-peer:rich_${{ env.RELEASE_VERSION }}
fluencelabs/nox:rich
fluencelabs/nox:rich_${{ env.RELEASE_VERSION }}
slack:
if: always()
Expand Down
28 changes: 8 additions & 20 deletions .github/workflows/update_fluence.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,25 @@
name: "update_fluence"
name: "Update nox version"

on:
workflow_dispatch:
workflow_call:
inputs:
version:
description: 'Fluence version'
required: true
url:
description: 'Fluence binary URL'
required: true
sha256:
description: 'Fluence binary SHA256 hash'
description: 'Contents of fluence.json file'
type: string
required: true

jobs:
update_fluence:
name: "Update Fluence"
runs-on: "ubuntu-latest"
update:
name: "Update version"
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.FLUENCEBOT_RELEASE_PLEASE_PAT }}

- name: Update Fluence in fluence.json to ${{ github.event.inputs.version }}
run: |
cat <<FLUENCE > fluence/fluence.json
{
"version": "${{ github.event.inputs.version }}",
"url": "${{ github.event.inputs.url }}",
"sha256": "${{ github.event.inputs.sha256 }}"
}
FLUENCE
run: echo ${{ inputs.version }} | jq > fluence/fluence.json

- name: Commit updated fluence.json
uses: stefanzweifel/git-auto-commit-action@v4
Expand Down
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
# Changelog

## [0.1.23](https://github.com/fluencelabs/nox-distro/compare/distro-v0.1.22...distro-v0.1.23) (2023-06-06)


### Bug Fixes

* **deps:** Update connector to 0.4.14 ([9ef1c73](https://github.com/fluencelabs/nox-distro/commit/9ef1c733523c25c67b082169702c2f7c9fe73ce2))
* **download_fluence.sh:** cat $CONFIG on fail ([2fd6790](https://github.com/fluencelabs/nox-distro/commit/2fd6790f89074ea42b0e94e4e7367805315fe579))

## [0.1.22](https://github.com/fluencelabs/rust-peer-distro/compare/distro-v0.1.21...distro-v0.1.22) (2023-06-02)


### Features

* **decider:** set default connector api endpoint [NET-479] ([#144](https://github.com/fluencelabs/rust-peer-distro/issues/144)) ([4caac9f](https://github.com/fluencelabs/rust-peer-distro/commit/4caac9f45f9f753d6f1e9fb7a4c9471a90336488))
* **Dockerfile:** set default FLUENCE_ENV_CONNECTOR_FROM_BLOCK env ([#145](https://github.com/fluencelabs/rust-peer-distro/issues/145)) ([3cdbba8](https://github.com/fluencelabs/rust-peer-distro/commit/3cdbba83957a48b84b398eb6b6fb6b8b6148420f))


### Bug Fixes

* **deps:** Update connector to 0.4.11 ([75f5dc8](https://github.com/fluencelabs/rust-peer-distro/commit/75f5dc885b8f7b4c19aebfe4c69dc1cb4ad0bd5e))
* **deps:** Update connector to 0.4.12 ([1fcbc32](https://github.com/fluencelabs/rust-peer-distro/commit/1fcbc32a0b2f0d6932f274705c0b28300337a407))
* **deps:** Update connector to 0.4.13 ([ba4772f](https://github.com/fluencelabs/rust-peer-distro/commit/ba4772fef2301a2123e298d282999764c842eafd))
* **deps:** Update registry to 0.8.6 ([81b9001](https://github.com/fluencelabs/rust-peer-distro/commit/81b900140b8cbdca3bd7f3f76c9c86af0f2c69bc))

## [0.1.21](https://github.com/fluencelabs/rust-peer-distro/compare/distro-v0.1.20...distro-v0.1.21) (2023-05-26)


Expand Down
87 changes: 40 additions & 47 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,58 +6,52 @@ ARG BITCOIN_CLI_VERSION=23.0

# prepare stage images
# ----------------------------------------------------------------------------
FROM ethereum/client-go:release-${GETH_VERSION} as prepare-geth
FROM ipfs/go-ipfs:v${IPFS_VERSION} as prepare-ipfs
FROM --platform=$TARGETPLATFORM ethereum/client-go:release-${GETH_VERSION} as prepare-geth
FROM --platform=$TARGETPLATFORM ipfs/go-ipfs:v${IPFS_VERSION} as prepare-ipfs

FROM alpine as prepare-bitcoin
FROM --platform=$TARGETPLATFORM alpine as prepare-bitcoin
ARG TARGETPLATFORM
ARG BUILDPLATFORM
ARG BITCOIN_CLI_VERSION

# Download checksums
ADD https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_CLI_VERSION}/SHA256SUMS ./
# Download archive
ADD https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_CLI_VERSION}/bitcoin-${BITCOIN_CLI_VERSION}-x86_64-linux-gnu.tar.gz ./
# Verify that downloaded archive matches exactly the hash that's provided
RUN grep " bitcoin-${BITCOIN_CLI_VERSION}-x86_64-linux-gnu.tar.gz\$" SHA256SUMS | sha256sum -c -
# Extract
RUN tar -xzf "bitcoin-${BITCOIN_CLI_VERSION}-x86_64-linux-gnu.tar.gz"

# Download bitcoin archive
COPY docker/download_bitcoin_cli.sh /docker/download_bitcoin_cli.sh
RUN /docker/download_bitcoin_cli.sh

# minimal
# ----------------------------------------------------------------------------
FROM ghcr.io/linuxserver/baseimage-ubuntu:jammy as minimal
FROM --platform=$TARGETPLATFORM ghcr.io/linuxserver/baseimage-ubuntu:jammy as minimal
ARG TARGETPLATFORM
ARG BUILDPLATFORM

# https://github.com/opencontainers/image-spec/blob/main/annotations.md#pre-defined-annotation-keys
LABEL org.opencontainers.image.base.name="ghcr.io/linuxserver/baseimage-ubuntu:focal"
LABEL org.opencontainers.image.url="https://github.com/fluencelabs/rust-peer-distro"
LABEL org.opencontainers.image.base.name="ghcr.io/linuxserver/baseimage-ubuntu:jammy"
LABEL org.opencontainers.image.url="https://github.com/fluencelabs/nox-distro"
LABEL org.opencontainers.image.vendor="fluencelabs"
LABEL maintainer="fluencelabs"
LABEL org.opencontainers.image.authors="fluencelabs"
LABEL org.opencontainers.image.title="Fluence rust-peer distro"
LABEL org.opencontainers.image.description="Minimal image containing only rust-peer itself"
LABEL org.opencontainers.image.title="Fluence nox distro"
LABEL org.opencontainers.image.description="Minimal image containing only nox itself"

ENV RUST_LOG="info,aquamarine=warn,tokio_threadpool=info,tokio_reactor=info,mio=info,tokio_io=info,soketto=info,yamux=info,multistream_select=info,libp2p_secio=info,libp2p_websocket::framed=info,libp2p_ping=info,libp2p_core::upgrade::apply=info,libp2p_kad::kbucket=info,cranelift_codegen=info,wasmer_wasi=info,cranelift_codegen=info,wasmer_wasi=info"
ENV RUST_BACKTRACE="1"
## set /run_fluence as the CMD binary
ENV S6_CMD_ARG0="/run_fluence"

RUN \
echo "**** install packages ****" && \
RUN --mount=type=cache,target=/var/cache/apt \
apt-get update && \
apt-get install -y --no-install-recommends \
jq \
less \
logrotate \
curl wget && \
echo "**** cleanup ****" && \
apt-get clean && \
rm -rf \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/*
curl wget

# install missing libssl
RUN \
wget http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb \
&& dpkg -i libssl1.1_1.1.1f-1ubuntu2_amd64.deb \
&& rm libssl1.1_1.1.1f-1ubuntu2_amd64.deb
COPY docker/install_libssl.sh /docker/install_libssl.sh
RUN /docker/install_libssl.sh

# aqua-ipfs builtin default env variables
# instruct aqua-ipfs (client) to work with an IPFS node hosted on ipfs.fluence.dev
Expand All @@ -75,9 +69,10 @@ ENV FLUENCE_ENV_CONNECTOR_CONTRACT_ADDRESS=0xb497e025D3095A197E30Ca84DEc36a637E6
# find deals from this block
ENV FLUENCE_ENV_CONNECTOR_FROM_BLOCK=0x75f3fbc

# download fluence, builtins
RUN --mount=type=bind,source=fluence,target=/fluence /fluence/download_builtins.sh /fluence/services.json
RUN --mount=type=bind,source=fluence,target=/fluence /fluence/download_fluence.sh /fluence/fluence.json
# download nox binary, builtins
COPY fluence/ /fluence/
RUN /fluence/download_builtins.sh /fluence/services.json
RUN /fluence/download_fluence.sh /fluence/fluence.json

# copy default fluence config
COPY fluence/Config.default.toml /.fluence/v1/Config.toml
Expand All @@ -92,8 +87,10 @@ COPY s6/minimal/ /
# ipfs
# ----------------------------------------------------------------------------
FROM minimal as ipfs
ARG TARGETPLATFORM
ARG BUILDPLATFORM

LABEL org.opencontainers.image.description="rust-peer bundled with IPFS daemon"
LABEL org.opencontainers.image.description="nox bundled with IPFS daemon"
LABEL dev.fluence.bundles.ipfs="${IPFS_VERSION}"

ENV IPFS_PATH=/config/ipfs
Expand All @@ -110,8 +107,9 @@ ENV IPFS_ADDRESSES_ANNOUNCE=/ip4/127.0.0.1/tcp/4001,/ip4/127.0.0.1/tcp/4001/ws
ENV FLUENCE_ENV_AQUA_IPFS_EXTERNAL_API_MULTIADDR=/ip4/127.0.0.1/tcp/5001
ENV FLUENCE_ENV_AQUA_IPFS_LOCAL_API_MULTIADDR=/ip4/127.0.0.1/tcp/5001

# download fs-repo-migrations
RUN wget -qO - "https://dist.ipfs.io/fs-repo-migrations/v2.0.2/fs-repo-migrations_v2.0.2_linux-amd64.tar.gz" | tar -C /usr/local/bin --strip-components=1 -zxvf -
# download ipfs fs-repo-migrations tool
COPY docker/download_ipfs_fs_repo_migrations.sh /docker/download_ipfs_fs_repo_migrations.sh
RUN /docker/download_ipfs_fs_repo_migrations.sh

# copy s6 configs
COPY s6/ipfs/ /
Expand All @@ -126,8 +124,10 @@ ARG CERAMIC_VERSION
ARG GLAZED_VERSION
ARG GETH_VERSION
ARG BITCOIN_CLI_VERSION
ARG TARGETPLATFORM
ARG BUILDPLATFORM

LABEL org.opencontainers.image.description="rust-peer bundled with IPFS, Ceramic CLI and other tools"
LABEL org.opencontainers.image.description="nox bundled with IPFS, Ceramic CLI and other tools"
LABEL dev.fluence.image.bundles.ceramic="${CERAMIC_VERSION}"
LABEL dev.fluence.image.bundles.glazed="${GLAZED_VERSION}"
LABEL dev.fluence.image.bundles.bitcoin_cli="${BITCOIN_CLI_VERSION}"
Expand All @@ -137,24 +137,17 @@ LABEL dev.fluence.image.bundles.geth="${GETH_VERSION}"
RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | gpg --dearmor > /usr/share/keyrings/nodesource.gpg \
&& echo "deb [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_16.x focal main" > /etc/apt/sources.list.d/nodesource.list

RUN \
echo "**** install packages ****" && \
RUN --mount=type=cache,target=/var/cache/apt \
apt-get update && \
apt-get install -y --no-install-recommends \
musl \
nodejs && \
echo "**** cleanup ****" && \
apt-get clean && \
rm -rf \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/*
nodejs

# install ceramic and glaze
RUN npm install --cache /cache --global \
@ceramicnetwork/cli@$CERAMIC_VERSION \
@glazed/cli@$GLAZED_VERSION \
&& rm -rf /cache
RUN --mount=type=cache,target=/var/cache/npm \
npm install --cache /var/cache/npm --global \
@ceramicnetwork/cli@$CERAMIC_VERSION \
@glazed/cli@$GLAZED_VERSION

# copy geth
COPY --from=prepare-geth /usr/local/bin/geth /usr/bin/geth
Expand Down
27 changes: 13 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,36 @@
# Rust Peer Distro
# Nox Distro

The distributive and packaging of the
[Rust peer](https://github.com/fluencelabs/rust-peer).
The distributive and packaging of the [nox](https://github.com/fluencelabs/nox).

## Installation and usage

```bash
docker run -d --name rust-peer -e RUST_LOG="info" -p 7777:7777 -p 9999:9999 fluencelabs/rust-peer:latest --local
docker run -d --name nox -e RUST_LOG="info" -p 7777:7777 -p 9999:9999 fluencelabs/nox:latest --local
```

To get a list of commands that can be passed to rust-peer run:
To get a list of commands that can be passed to nox run:

```bash
docker run --rm --name rust-peer fluencelabs/rust-peer:latest --help
docker run --rm --name nox fluencelabs/nox:latest --help
```

See deployment instructions and tips at
[deploy](https://github.com/fluencelabs/rust-peer-distro/tree/master/deploy).
[deploy](https://github.com/fluencelabs/nox-distro/tree/master/deploy).

## Documentation

- Rust peer distro
[image flavours](https://github.com/fluencelabs/rust-peer-distro/tree/master/docs/flavours.md)
- [Builtin services](https://github.com/fluencelabs/rust-peer-distro/tree/master/docs/builtins.md)
[image flavours](https://github.com/fluencelabs/nox-distro/tree/master/docs/flavours.md)
- [Builtin services](https://github.com/fluencelabs/nox-distro/tree/master/docs/builtins.md)

Comprehensive documentation on everything related to Fluence can be found
[here](https://fluence.dev/). Check also our
[YouTube channel](https://www.youtube.com/@fluencelabs).

## Support

Please, file an [issue](https://github.com/fluencelabs/rust-peer-distro/issues)
if you find a bug. You can also contact us at
Please, file an [issue](https://github.com/fluencelabs/nox-distro/issues) if you
find a bug. You can also contact us at
[Discord](https://discord.com/invite/5qSnPZKh7u) or
[Telegram](https://t.me/fluence_project). We will do our best to resolve the
issue ASAP.
Expand All @@ -40,12 +39,12 @@ issue ASAP.

Any interested person is welcome to contribute to the project. Please, make sure
you read and follow some basic
[rules](https://github.com/fluencelabs/rust-peer-distro/tree/master/CONTRIBUTING.md).
[rules](https://github.com/fluencelabs/nox-distro/tree/master/CONTRIBUTING.md).
The Contributor License Agreement can be found
[here](https://github.com/fluencelabs/rust-peer-distro/tree/master/FluenceCLA).
[here](https://github.com/fluencelabs/nox-distro/tree/master/FluenceCLA).

## License

All software code is copyright (c) Fluence Labs, Inc. under the
[Apache-2.0](https://github.com/fluencelabs/rust-peer-distro/tree/master/LICENSE)
[Apache-2.0](https://github.com/fluencelabs/nox-distro/tree/master/LICENSE)
license.
16 changes: 10 additions & 6 deletions deploy/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
# Running Rust Peer
# Running nox

Currently there is only one way to try out the Rust peer. It is by running it with [docker-compose](docker-compose/). An example configuration for popular orchestration platforms like [HasiCorp Nomad](https://www.nomadproject.io/) and K8S are coming soon! Meanwhile, you can adapt [this docker-compose file](docker-compose/docker-compose.yml) for the platform of your choice.
Currently there is only one way to try out the Rust peer. It is by running it
with [docker-compose](docker-compose/). An example configuration for popular
orchestration platforms like [HasiCorp Nomad](https://www.nomadproject.io/) and
K8S are coming soon! Meanwhile, you can adapt
[this docker-compose file](docker-compose/docker-compose.yml) for the platform
of your choice.

## Configuring nox distro image

## Configuring rust-peer distro image

Checkout [this doc](../docs/flavours.md) to learn more about rust-peer image
flavours and environment variables used to configure the images.
Checkout [this doc](../docs/flavours.md) to learn more about nox image flavours
and environment variables used to configure the images.
Loading

0 comments on commit 986a58d

Please sign in to comment.