git.delta.rocks / unique-network / refs/commits / 129947cf5141

difftreelog

add docker-compose files for xcm

Konstantin Astakhov2022-08-24parent: #997ec5a.patch.diff
in: master

6 files changed

added.docker/Dockerfile-xcmdiffbeforeafterboth
after · .docker/Dockerfile-xcm
1# ===== Rust builder =====2FROM ubuntu:20.04 as rust-builder3LABEL maintainer="Unique.Network"45ARG RUST_TOOLCHAIN=67ENV RUST_TOOLCHAIN $RUST_TOOLCHAIN8ENV CARGO_HOME="/cargo-home"9ENV PATH="/cargo-home/bin:$PATH"10ENV TZ=UTC11RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone1213RUN apt-get update && \14    apt-get install -y curl cmake pkg-config libssl-dev git clang llvm libudev-dev && \15    apt-get clean && \16    rm -r /var/lib/apt/lists/*1718RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none1920RUN rustup toolchain uninstall $(rustup toolchain list) && \21    rustup toolchain install $RUST_TOOLCHAIN && \22    rustup default $RUST_TOOLCHAIN && \23    rustup target list --installed && \24    rustup show25RUN rustup target add wasm32-unknown-unknown --toolchain $RUST_TOOLCHAIN2627RUN mkdir /unique_parachain28WORKDIR /unique_parachain293031# ===== BUILD ======32FROM rust-builder as builder-unique3334ARG PROFILE=release35ARG FEATURE=36ARG REPO_URL=37ARG BRANCH=383940WORKDIR /unique_parachain4142RUN git clone $REPO_URL -b $BRANCH . && \43    cargo build --features=$FEATURE --$PROFILE4445# ===== BUILD POLKADOT =====46FROM rust-builder as builder-polkadot4748ARG POLKADOT_BUILD_BRANCH=49ENV POLKADOT_BUILD_BRANCH $POLKADOT_BUILD_BRANCH505152WORKDIR /unique_parachain5354RUN git clone -b $POLKADOT_BUILD_BRANCH --depth 1 https://github.com/paritytech/polkadot.git && \55    cd polkadot && \56    cargo build --release5758# ===== BUILD ACALA =====59FROM rust-builder as builder-acala6061ARG ACALA_BUILD_BRANCH=62ENV ACALA_BUILD_BRANCH $ACALA_BUILD_BRANCH636465WORKDIR /unique_parachain6667RUN git clone -b $ACALA_BUILD_BRANCH --depth 1 https://github.com/AcalaNetwork/Acala.git && \68    cd Acala && \69    make init && \70    cargo build --release7172# ===== BUILD MOONBEAM =====73FROM rust-builder as builder-moonbeam7475ARG MOONBEAM_BUILD_BRANCH=76ENV MOONBEAM_BUILD_BRANCH $MOONBEAM_BUILD_BRANCH777879WORKDIR /unique_parachain8081RUN git clone -b $MOONBEAM_BUILD_BRANCH --depth 1 https://github.com/PureStake/moonbeam.git && \82    cd moonbeam && \83    cargo build --release8485# ===== BUILD CUMULUS =====86FROM rust-builder as builder-cumulus8788ARG CUMULUS_BUILD_BRANCH=89ENV CUMULUS_BUILD_BRANCH $CUMULUS_BUILD_BRANCH909192WORKDIR /unique_parachain9394RUN git clone -b $CUMULUS_BUILD_BRANCH --depth 1 https://github.com/paritytech/cumulus.git && \95    cd cumulus && \96    cargo build --release9798# ===== RUN ======99100FROM ubuntu:20.04101102RUN apt-get -y update && \103      apt-get -y install curl git && \104      curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash && \105      export NVM_DIR="$HOME/.nvm" && \106      [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \107      nvm install v16.16.0 && \108      nvm use v16.16.0109110RUN git clone https://github.com/uniquenetwork/polkadot-launch -b feature/runtime-upgrade-testing111112RUN export NVM_DIR="$HOME/.nvm" && \113    [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \114    cd /polkadot-launch && \115    npm install --global yarn && \116    yarn install117118COPY --from=builder-unique /unique_parachain/target/release/unique-collator /unique-chain/target/release/119COPY --from=builder-polkadot /unique_parachain/polkadot/target/release/polkadot /polkadot/target/release/120COPY --from=builder-acala /unique_parachain/Acala/target/production/acala /acala/target/release/121COPY --from=builder-moonbeam /unique_parachain/moonbeam/target/release/moonbeam /moonbeam/target/release/122COPY --from=builder-cumulus /unique_parachain/cumulus/target/release/polkadot-parachain /cumulus/target/release/cumulus123124CMD export NVM_DIR="$HOME/.nvm" && \125    [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \126    cd /polkadot-launch && \127    yarn start launch-config.json
added.docker/docker-compose-xcm.ymldiffbeforeafterboth
--- /dev/null
+++ b/.docker/docker-compose-xcm.yml
@@ -0,0 +1,25 @@
+version: "3.5"
+
+services:
+  xcm_nodes:
+    build:
+      context: ../
+      dockerfile: .docker/Dockerfile-xcm
+    image: xcm_nodes
+    container_name: xcm_nodes
+    expose:
+      - 9844
+      - 9944
+      - 9946
+      - 9947
+      - 9948
+    ports:
+      - 127.0.0.1:9844:9844
+      - 127.0.0.1:9944:9944
+      - 127.0.0.1:9946:9946
+      - 127.0.0.1:9947:9947
+      - 127.0.0.1:9948:9948
+    logging:
+      options:
+        max-size: "1m"
+        max-file: "3"
added.docker/docker-compose.tmp-xcm-quartz.ymldiffbeforeafterboth
--- /dev/null
+++ b/.docker/docker-compose.tmp-xcm-quartz.yml
@@ -0,0 +1,19 @@
+version: "3.5"
+
+services:
+  xcm_nodes:
+    build:
+      args:
+        - "RUST_TOOLCHAIN=nightly-2022-07-24"
+        - "BRANCH=release-v927020"
+        - "REPO_URL=https://github.com/UniqueNetwork/unique-chain.git"
+        - "FEATURE=quartz-runtime"
+        - "POLKADOT_BUILD_BRANCH=release-v0.9.27"
+        - "ACALA_BUILD_BRANCH=2.9.0"
+        - "MOONBEAM_BUILD_BRANCH=v0.25.0"
+        - "CUMULUS_BUILD_BRANCH=release-v0.9.230"
+    volumes:
+       - type: bind
+         source: ./launch-config-xcm-quartz.json
+         target: /polkadot-launch/launch-config.json
+         read_only: true          
added.docker/docker-compose.tmp-xcm-unique.ymldiffbeforeafterboth
--- /dev/null
+++ b/.docker/docker-compose.tmp-xcm-unique.yml
@@ -0,0 +1,19 @@
+version: "3.5"
+
+services:
+  xcm_nodes:
+    build:
+      args:
+        - "RUST_TOOLCHAIN=nightly-2022-07-24"
+        - "BRANCH=release-v927020"
+        - "REPO_URL=https://github.com/UniqueNetwork/unique-chain.git"
+        - "FEATURE=unique-runtime"
+        - "POLKADOT_BUILD_BRANCH=release-v0.9.27"
+        - "ACALA_BUILD_BRANCH=2.9.0"
+        - "MOONBEAM_BUILD_BRANCH=v0.25.0"
+        - "CUMULUS_BUILD_BRANCH=release-v0.9.230"
+    volumes:
+       - type: bind
+         source: ./launch-config-xcm-unique.json
+         target: /polkadot-launch/launch-config.json
+         read_only: true          
added.docker/launch-config-xcm-quartz.jsondiffbeforeafterboth
--- /dev/null
+++ b/.docker/launch-config-xcm-quartz.json
@@ -0,0 +1,171 @@
+{
+    "relaychain": {
+        "bin": "/polkadot/target/release/polkadot",
+        "chain": "westend-local",
+        "nodes": [
+            {
+                "name": "alice",
+                "wsPort": 9844,
+                "rpcPort": 9843,
+                "port": 30444,
+                "flags": [
+                    "-lparachain::candidate_validation=debug"
+                ]
+            },
+            {
+                "name": "bob",
+                "wsPort": 9855,
+                "rpcPort": 9854,
+                "port": 30555,
+                "flags": [
+                    "-lparachain::candidate_validation=debug"
+                ]
+            },
+            {
+                "name": "charlie",
+                "wsPort": 9866,
+                "rpcPort": 9865,
+                "port": 30666,
+                "flags": [
+                    "-lparachain::candidate_validation=debug"
+                ]
+            },
+            {
+                "name": "dave",
+                "wsPort": 9877,
+                "rpcPort": 9876,
+                "port": 30777,
+                "flags": [
+                    "-lparachain::candidate_validation=debug"
+                ]
+            },
+            {
+                "name": "eve",
+                "wsPort": 9888,
+                "rpcPort": 9887,
+                "port": 30888,
+                "flags": [
+                    "-lparachain::candidate_validation=debug"
+                ]
+            }
+
+        ],
+        "genesis": {
+            "runtime": {
+                "runtime_genesis_config": {
+                    "parachainsConfiguration": {
+                        "config": {
+                            "validation_upgrade_frequency": 1,
+                            "validation_upgrade_delay": 1
+                        }
+                    }
+                }
+            }
+        }
+    },
+    "parachains": [
+        {
+            "bin": "/unique-chain/target/release/unique-collator",
+            "id": "2095",
+            "balance": "1000000000000000000000000",
+            "nodes": [
+                {
+                    "port": 31200,
+                    "wsPort": 9944,
+                    "rpcPort": 9933,
+                    "name": "alice",
+                    "flags": [
+                    ]
+                }
+            ]
+        },
+        {
+            "bin": "/acala/target/release/acala",
+            "id": "2000",
+            "chain":  "karura-dev",
+            "balance": "1000000000000000000000",
+            "nodes": [
+                {
+                    "wsPort": 9946,
+                    "port": 31202,
+                    "name": "alice",
+                    "flags": [
+                     ]
+                }
+              ]
+        },
+        {
+            "bin": "/moonbeam/target/release/moonbeam",
+            "id": 2023,
+            "balance": "1000000000000000000000",
+            "chain": "moonriver-local",
+            "nodes": [
+                {
+                    "wsPort": 9947,
+                    "port": 31203,
+                    "name": "alice",
+                    "flags": [
+                        "--",
+                        "--execution=wasm"
+                    ]
+                }
+            ]
+        },
+        {
+            "bin": "/cumulus/target/release/cumulus",
+            "id": "1000",
+            "chain": "statemine-local",
+            "balance": "1000000000000000000000000",
+            "nodes": [
+                {
+                    "wsPort": 9948,
+                    "port": 31204,
+                    "name": "alice",
+                    "flags": [
+                    ]
+                }
+            ]
+        }
+    ],
+    "simpleParachains": [],
+    "hrmpChannels": [
+        {
+            "sender": 2095,
+            "recipient": 2000,
+            "maxCapacity": 8,
+            "maxMessageSize": 512
+        },
+        {
+            "sender": 2000,
+            "recipient": 2095,
+            "maxCapacity": 8,
+            "maxMessageSize": 512
+        },
+        {
+            "sender": 2095,
+            "recipient": 2023,
+            "maxCapacity": 8,
+            "maxMessageSize": 512
+        },
+        {
+            "sender": 2023,
+            "recipient": 2095,
+            "maxCapacity": 8,
+            "maxMessageSize": 512
+        },
+        {
+            "sender": 2095,
+            "recipient": 1000,
+            "maxCapacity": 8,
+            "maxMessageSize": 512
+        },
+        {
+            "sender": 1000,
+            "recipient": 2095,
+            "maxCapacity": 8,
+            "maxMessageSize": 512
+        }
+    ],
+    "finalization": false
+}
+
added.docker/launch-config-xcm-unique.jsondiffbeforeafterboth
--- /dev/null
+++ b/.docker/launch-config-xcm-unique.json
@@ -0,0 +1,171 @@
+{
+    "relaychain": {
+        "bin": "/polkadot/target/release/polkadot",
+        "chain": "westend-local",
+        "nodes": [
+            {
+                "name": "alice",
+                "wsPort": 9844,
+                "rpcPort": 9843,
+                "port": 30444,
+                "flags": [
+                    "-lparachain::candidate_validation=debug"
+                ]
+            },
+            {
+                "name": "bob",
+                "wsPort": 9855,
+                "rpcPort": 9854,
+                "port": 30555,
+                "flags": [
+                    "-lparachain::candidate_validation=debug"
+                ]
+            },
+            {
+                "name": "charlie",
+                "wsPort": 9866,
+                "rpcPort": 9865,
+                "port": 30666,
+                "flags": [
+                    "-lparachain::candidate_validation=debug"
+                ]
+            },
+            {
+                "name": "dave",
+                "wsPort": 9877,
+                "rpcPort": 9876,
+                "port": 30777,
+                "flags": [
+                    "-lparachain::candidate_validation=debug"
+                ]
+            },
+            {
+                "name": "eve",
+                "wsPort": 9888,
+                "rpcPort": 9887,
+                "port": 30888,
+                "flags": [
+                    "-lparachain::candidate_validation=debug"
+                ]
+            }
+
+        ],
+        "genesis": {
+            "runtime": {
+                "runtime_genesis_config": {
+                    "parachainsConfiguration": {
+                        "config": {
+                            "validation_upgrade_frequency": 1,
+                            "validation_upgrade_delay": 1
+                        }
+                    }
+                }
+            }
+        }
+    },
+    "parachains": [
+        {
+            "bin": "/unique-chain/target/release/unique-collator",
+            "id": "2037",
+            "balance": "1000000000000000000000000",
+            "nodes": [
+                {
+                    "port": 31200,
+                    "wsPort": 9944,
+                    "rpcPort": 9933,
+                    "name": "alice",
+                    "flags": [
+                    ]
+                }
+            ]
+        },
+        {
+            "bin": "/acala/target/release/acala",
+            "id": "2000",
+            "chain":  "acala-dev",
+            "balance": "1000000000000000000000",
+            "nodes": [
+                {
+                    "wsPort": 9946,
+                    "port": 31202,
+                    "name": "alice",
+                    "flags": [
+                     ]
+                }
+              ]
+        },
+        {
+            "bin": "/moonbeam/target/release/moonbeam",
+            "id": "2004",
+            "balance": "1000000000000000000000",
+            "chain": "moonbeam-local",
+            "nodes": [
+                {
+                    "wsPort": 9947,
+                    "port": 31203,
+                    "name": "alice",
+                    "flags": [
+                        "--",
+                        "--execution=wasm"
+                    ]
+                }
+            ]
+        },
+        {
+            "bin": "/cumulus/target/release/cumulus",
+            "id": "1000",
+            "chain": "statemint-local",
+            "balance": "1000000000000000000000000",
+            "nodes": [
+                {
+                    "wsPort": 9948,
+                    "port": 31204,
+                    "name": "alice",
+                    "flags": [
+                    ]
+                }
+            ]
+        }
+    ],
+    "simpleParachains": [],
+    "hrmpChannels": [
+        {
+            "sender": 2037,
+            "recipient": 2000,
+            "maxCapacity": 8,
+            "maxMessageSize": 512
+        },
+        {
+            "sender": 2000,
+            "recipient": 2037,
+            "maxCapacity": 8,
+            "maxMessageSize": 512
+        },
+        {
+            "sender": 2037,
+            "recipient": 2004,
+            "maxCapacity": 8,
+            "maxMessageSize": 512
+        },
+        {
+            "sender": 2004,
+            "recipient": 2037,
+            "maxCapacity": 8,
+            "maxMessageSize": 512
+        },
+        {
+            "sender": 2037,
+            "recipient": 1000,
+            "maxCapacity": 8,
+            "maxMessageSize": 512
+        },
+        {
+            "sender": 1000,
+            "recipient": 2037,
+            "maxCapacity": 8,
+            "maxMessageSize": 512
+        }
+    ],
+    "finalization": false
+}
+