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

Feature/simnode workflow #461

Merged
merged 42 commits into from
Jan 10, 2022
Merged
Show file tree
Hide file tree
Changes from 32 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
640e3b9
Update Makefile
haroldsphinx Nov 24, 2021
25d6886
Update release
haroldsphinx Nov 30, 2021
6c2edbf
Update release
haroldsphinx Nov 30, 2021
00f28ef
Merge branch 'main' of github.com:ComposableFi/composable into main
haroldsphinx Nov 30, 2021
ab24616
Update
haroldsphinx Dec 8, 2021
989f72b
Update
haroldsphinx Dec 8, 2021
663b334
Updating release
haroldsphinx Dec 8, 2021
c9e0725
Added runtime check
haroldsphinx Dec 13, 2021
45ea896
Update bootnode config
haroldsphinx Dec 16, 2021
3f26893
Merge main-sre to picasso
haroldsphinx Dec 16, 2021
a4f49a3
UPdate
haroldsphinx Dec 29, 2021
a7e1b64
Merge branch 'main' of github.com:ComposableFi/composable into main
haroldsphinx Jan 5, 2022
6e22b8d
Merge branch 'main' of github.com:ComposableFi/composable into main
haroldsphinx Jan 6, 2022
31eeed4
Consolidate all branches into main
haroldsphinx Jan 6, 2022
225dec0
Update
haroldsphinx Jan 9, 2022
243955b
Merge branch 'main' of github.com:ComposableFi/composable into main
haroldsphinx Jan 9, 2022
a1a1fff
Initalize cache
haroldsphinx Jan 9, 2022
b1612be
Initalize cache
haroldsphinx Jan 9, 2022
73e0bed
Initalize cache
haroldsphinx Jan 9, 2022
fe54baf
Initalize cache
haroldsphinx Jan 9, 2022
9b23e5d
Initalize cache
haroldsphinx Jan 9, 2022
95b5573
Initalize cache
haroldsphinx Jan 9, 2022
43811ee
Initalize cache
haroldsphinx Jan 9, 2022
779985d
Initalize cache
haroldsphinx Jan 9, 2022
8a5c655
Initalize cache
haroldsphinx Jan 9, 2022
407a5a6
Initalize cache
haroldsphinx Jan 9, 2022
486c812
Initalize cache
haroldsphinx Jan 9, 2022
5567451
Initalize cache
haroldsphinx Jan 9, 2022
9063dd2
Update build parameters
haroldsphinx Jan 9, 2022
9e97326
Update build parameters
haroldsphinx Jan 9, 2022
a95e134
Add simnode workflow
haroldsphinx Jan 9, 2022
fe46ac1
Add simonde to workflow file
haroldsphinx Jan 9, 2022
c46e856
Merge branch 'main' of github.com:ComposableFi/composable into featur…
haroldsphinx Jan 9, 2022
2e21a31
Add simonde to workflow file
haroldsphinx Jan 9, 2022
027525a
Merge branch 'main' of github.com:ComposableFi/composable into featur…
haroldsphinx Jan 10, 2022
f8d7ea8
Update ci
haroldsphinx Jan 10, 2022
797d984
Update ci
haroldsphinx Jan 10, 2022
296968d
Update cargo path
haroldsphinx Jan 10, 2022
54ae5d7
Update cargo path
haroldsphinx Jan 10, 2022
ee863f9
Update cargo path
haroldsphinx Jan 10, 2022
87663ce
Update cargo path
haroldsphinx Jan 10, 2022
8b0514e
Update cargo path
haroldsphinx Jan 10, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
44 changes: 0 additions & 44 deletions .github/workflows/Picasso-release.yml

This file was deleted.

20 changes: 20 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,26 @@ jobs:
- x64
- sre
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
haroldsphinx marked this conversation as resolved.
Show resolved Hide resolved
seunlanlege marked this conversation as resolved.
Show resolved Hide resolved

- name: 🔨 Build
uses: actions-rs/cargo@v1
with:
command: build
args: --release -p simnode

- name: Simnode Test
run: |
YDATE=$(date -d yesterday +'%m-%d-%Y')
FILENAME=cl-1-$YDATE.zip
GS_BUCKET="composable-picasso-data-sync"
sudo gsutil cp gs://$GS_BUCKET/$FILENAME .
sudo unzip $FILENAME -d /tmp/db
./target/release/simnode --chain=picasso --base-path=/tmp/db --wasm-runtime-overrides=./target/release/picasso_runtime.compact.wasm --pruning=archive --execution=wasm
seunlanlege marked this conversation as resolved.
Show resolved Hide resolved

- uses: actions/checkout@v2
- name: Install toolchain for cargo-llvm-cov
run: |
Expand Down
25 changes: 21 additions & 4 deletions .github/workflows/client-release.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
name: "Dali-chachacha Community Release"
name: "Community Release (Dali Chacha)"

on:
push:
tags:
- '*'
branches:
- update-event-triggers
- feature/add-cache-build

env:
DOCKER_USER_OPTION: '$UID:$GID'
SCCACHE_GCS_BUCKET: 'composable-build-artefacts'
RUSTC_WRAPPER: "/home/runner/.cargo/bin/sccache"
SCCACHE_GCS_RW_MODE: "READ_WRITE"

jobs:
build-and-publish:
Expand All @@ -17,6 +20,8 @@ jobs:
- linux
- x64
- sre
strategy:
fail-fast: true
steps:
- uses: xanantis/docker-file-ownership-fix@v1
- uses: actions/checkout@v2
Expand All @@ -27,9 +32,20 @@ jobs:
run: |
echo "RELEASE_VERSION=$(git tag --sort=committerdate | grep -E '^v[0-9]' | tail -1 )" >> $GITHUB_ENV
make version
- name: Build and Push Artifacts to gcloud

- uses: actions-rs/toolchain@v1
with:
toolchain: stable

- name: 🔨 Build
uses: actions-rs/cargo@v1
with:
command: build
args: --release --bins
haroldsphinx marked this conversation as resolved.
Show resolved Hide resolved

- name: Archive build targets
run: |
/home/runner/.cargo/bin/cargo build --release --bins
tar -czvf composable-${{ env.RELEASE_VERSION }}.tar.gz target/release/
tar -czvf composable-${{ env.RELEASE_VERSION }}.tar.gz target/release/composable
tar -czvf picasso_runtime.compact.wasm-${RELEASE_VERSION}.tar.gz target/release/wbuild/picasso-runtime/picasso_runtime.compact.wasm
tar -czvf parachain-utils-${RELEASE_VERSION}.tar.gz target/release/parachain-utils
Expand All @@ -43,6 +59,7 @@ jobs:

- name: Build Docker image
run: make containerize-release

- name: Docker push
run: make push-release

Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/picashot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Check Runtime
seunlanlege marked this conversation as resolved.
Show resolved Hide resolved
on:
schedule:
- cron: '0 0 * * *'
jobs:
picashot:
runs-on:
- self-hosted
- linux
- X64
- ansible-runner

steps:
- name: Run ansible playbook
working-directory: "./.maintain/playbooks"
run: |
ansible-playbook -l _mainnet_collator_yes picashot.yml -i picasso-gcp.yaml --user root -e 'ansible_python_interpreter=/usr/bin/python3'

7 changes: 7 additions & 0 deletions .maintain/files/backup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh
DATE=$(date +'%m-%d-%Y')
FILENAME=composable-$DATE.zip
BACKUP_DIR="/var/lib/composable-data/chains"
GS_BUCKET="composable-picasso-data-sync"
zip -r $FILENAME $BACKUP_DIR
gsutil mv $FILENAME gs://$GS_BUCKET/
20 changes: 20 additions & 0 deletions .maintain/playbooks/picashot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
- name: Create Backup for Picasso nodes
hosts: all
become: true
tasks:
- name: Run Backup Script
become: true
shell: |
#!/bin/bash
DATE=$(date +'%m-%d-%Y')
HOST=$(echo $HOSTNAME)
FILENAME=$HOST-$DATE.zip
BACKUP_DIR="/var/lib/composable-data/chains"
GS_BUCKET="composable-picasso-data-sync"
zip -r $FILENAME $BACKUP_DIR
gsutil mv $FILENAME gs://$GS_BUCKET/
args:
executable: /bin/bash
register: stdout

4 changes: 1 addition & 3 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM composablefi/rust:latest

ARG VERSION=v1.0.9
ARG VERSION

USER root

Expand All @@ -24,8 +24,6 @@ RUN curl "https://storage.googleapis.com/composable-binaries/community-releases/

RUN chmod +x target/release/composable && mv target/release/composable /usr/local/bin

RUN composable --version

RUN useradd -m -u 1001 -U -s /bin/sh -d /composable composable && \
mkdir -p /composable/.local/share/local_testnet && \
mkdir /data && \
Expand Down