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

Create short guide explaining how to hot-reload the Iroha binary in the docker container #2119

Closed
appetrosyan opened this issue Apr 18, 2022 · 1 comment
Assignees
Labels
Documentation Documentation changes iroha2-dev The re-implementation of a BFT hyperledger in RUST

Comments

@appetrosyan
Copy link
Contributor

No description provided.

@appetrosyan appetrosyan added iroha2-dev The re-implementation of a BFT hyperledger in RUST Documentation Documentation changes labels Apr 18, 2022
@mversic mversic self-assigned this Apr 18, 2022
@mversic
Copy link
Contributor

mversic commented Apr 18, 2022

I made the following write-up

Procedure

  1. Build Iroha with cargo build --release or similar on your host OS
  2. Enter docker container with docker exec -it iroha-iroha0-1 bash
  3. Execute cp root/soramitsu/iroha/target/x86_64-unknown-linux-musl/release/iroha .
  4. Exit docker container and restart it - your custom Iroha should be up and running

Static linking

Sometimes an issue can arise with dynamically linking against glibc
if your host OS has a newer version of glibc than what is offered in the docker container.
If this happens you should add --target x86_64-unknown-linux-musl to your build command to
force static linking against musl libc implementation. You should also enable "vendored"
feature with --features "vendored" to facilitate static linking of openssl library

Recommit genesis block (fresh start)

Previously explained procedure will keep the state of the blockchain as it was at the time
of restarting the docker container. If it is required to also recommit a custom genesis block
this will be done automatically if you remove the block information stored on the disk with
rm blocks/* before restarting the container

Using custom configuration files (e.g. config.json/genesis.json)

Just copy them to / before restarting docker container. Changes will take effect automatically upon container restart

Custom env variables (e.g. IROHA_PUBLIC_KEY)

Just modify them before restarting container. Changes will take effect automatically upon container restart

Container restart VS. container down + container up

If you use container down + container up any modifications you made to the container will be lost, use restart instead

Where would you like to place this information?

@outoftardis outoftardis self-assigned this Apr 29, 2022
outoftardis added a commit to outoftardis/iroha that referenced this issue May 11, 2022
…load Iroha in a Docker container

Signed-off-by: Ekaterina Mekhnetsova <mekkatya@gmail.com>
outoftardis added a commit to outoftardis/iroha that referenced this issue May 12, 2022
…load Iroha in a Docker container

Signed-off-by: Ekaterina Mekhnetsova <mekkatya@gmail.com>
outoftardis added a commit that referenced this issue May 12, 2022
[documentation] #2119: Add guidance on how to hot reload Iroha in a Docker container
outoftardis added a commit to outoftardis/iroha that referenced this issue May 12, 2022
…load Iroha in a Docker container

Signed-off-by: Ekaterina Mekhnetsova <mekkatya@gmail.com>
appetrosyan pushed a commit to appetrosyan/iroha that referenced this issue May 12, 2022
…load Iroha in a Docker container

Signed-off-by: Ekaterina Mekhnetsova <mekkatya@gmail.com>
appetrosyan pushed a commit to appetrosyan/iroha that referenced this issue May 12, 2022
…load Iroha in a Docker container

Signed-off-by: Ekaterina Mekhnetsova <mekkatya@gmail.com>
appetrosyan pushed a commit to appetrosyan/iroha that referenced this issue May 12, 2022
…load Iroha in a Docker container

Signed-off-by: Ekaterina Mekhnetsova <mekkatya@gmail.com>
appetrosyan pushed a commit to appetrosyan/iroha that referenced this issue May 12, 2022
…load Iroha in a Docker container

Signed-off-by: Ekaterina Mekhnetsova <mekkatya@gmail.com>
appetrosyan pushed a commit to appetrosyan/iroha that referenced this issue May 12, 2022
…load Iroha in a Docker container

Signed-off-by: Ekaterina Mekhnetsova <mekkatya@gmail.com>
appetrosyan pushed a commit to appetrosyan/iroha that referenced this issue May 12, 2022
…load Iroha in a Docker container

Signed-off-by: Ekaterina Mekhnetsova <mekkatya@gmail.com>
appetrosyan pushed a commit to appetrosyan/iroha that referenced this issue May 12, 2022
…load Iroha in a Docker container

Signed-off-by: Ekaterina Mekhnetsova <mekkatya@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Documentation changes iroha2-dev The re-implementation of a BFT hyperledger in RUST
Projects
None yet
Development

No branches or pull requests

3 participants