Skip to content

Instantly share code, notes, and snippets.

@jsh1n
Last active February 6, 2024 14:26
Show Gist options
  • Save jsh1n/c8ed724912ccc8625d54f0e8636701f5 to your computer and use it in GitHub Desktop.
Save jsh1n/c8ed724912ccc8625d54f0e8636701f5 to your computer and use it in GitHub Desktop.

Revisions

  1. jsh1n revised this gist Feb 6, 2024. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions run-avail.sh
    Original file line number Diff line number Diff line change
    @@ -14,6 +14,7 @@ sudo apt-get update -y
    sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-compose jq -y

    [ -e docker-compose.yml ] && rm -- docker-compose.yml
    [ ! -d state ] && mkdir state
    wget https://gist.github.com/jsh1n/bcb63d961659b3396ac3871eb567f15e/raw/docker-compose.yml
    sudo docker-compose up -d
    echo "wait for docker-compose starts 20 seconds"
  2. jsh1n revised this gist Feb 6, 2024. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions run-avail.sh
    Original file line number Diff line number Diff line change
    @@ -13,6 +13,7 @@ echo \
    sudo apt-get update -y
    sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-compose jq -y

    [ -e docker-compose.yml ] && rm -- docker-compose.yml
    wget https://gist.github.com/jsh1n/bcb63d961659b3396ac3871eb567f15e/raw/docker-compose.yml
    sudo docker-compose up -d
    echo "wait for docker-compose starts 20 seconds"
  3. jsh1n revised this gist Feb 6, 2024. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion run-avail.sh
    Original file line number Diff line number Diff line change
    @@ -17,4 +17,5 @@ wget https://gist.github.com/jsh1n/bcb63d961659b3396ac3871eb567f15e/r
    sudo docker-compose up -d
    echo "wait for docker-compose starts 20 seconds"
    sleep 20
    sudo docker-compose exec avail-validator curl -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": "author_rotateKeys", "params":[]}' http://localhost:9944 | jq .result
    echo "Session Key is below:"
    sudo docker-compose exec -T avail-validator curl -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": "author_rotateKeys", "params":[]}' http://localhost:9944 | jq .result
  4. jsh1n created this gist Feb 6, 2024.
    20 changes: 20 additions & 0 deletions run-avail.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,20 @@
    # Add Docker's official GPG key:
    sudo apt-get update -y
    sudo apt-get install ca-certificates curl -y
    sudo install -m 0755 -d /etc/apt/keyrings
    sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
    sudo chmod a+r /etc/apt/keyrings/docker.asc

    # Add the repository to Apt sources:
    echo \
    "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
    $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | sudo tee /etc/apt/sources.list.d/docker.list

    sudo apt-get update -y
    sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-compose jq -y

    wget https://gist.github.com/jsh1n/bcb63d961659b3396ac3871eb567f15e/raw/docker-compose.yml
    sudo docker-compose up -d
    echo "wait for docker-compose starts 20 seconds"
    sleep 20
    sudo docker-compose exec avail-validator curl -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": "author_rotateKeys", "params":[]}' http://localhost:9944 | jq .result