diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..6ae1f275d --- /dev/null +++ b/.gitignore @@ -0,0 +1,15 @@ +examples/builder +examples/docker +examples/publisher +examples/texttools +examples/gittools +examples/tmux +examples/vredis2 +*dSYM/ +publisher/publish +install_publisher +.vmodules/ +vex_webserver +publishtools/publishtools +.vscode +testdeployment diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile new file mode 100644 index 000000000..d2532d774 --- /dev/null +++ b/.gitpod.Dockerfile @@ -0,0 +1,23 @@ + +FROM gitpod/workspace-full:latest + +USER root +RUN apt-get update && apt-get install -y redis-server mc + +#prepare for gitpod nodejs env +ADD install_node.sh /tmp/install_node.sh +RUN sudo bash /tmp/install_node.sh + + +#install node & rmb +# ADD install_v_rmb.sh /tmp/install_v_rmb.sh +# RUN sudo bash /tmp/install_v_rmb.sh + + +# install tfgrid-substrate + +RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - && echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list && sudo apt update && sudo apt install -y yarn + +RUN cd tfgrid-substrate/cli-tool && sudo yarn + +# USER gitpod \ No newline at end of file diff --git a/.gitpod.yml b/.gitpod.yml new file mode 100644 index 000000000..83c7de446 --- /dev/null +++ b/.gitpod.yml @@ -0,0 +1,36 @@ +image: + file: .gitpod.Dockerfile +tasks: +# - init: bash prepare.sh + # - command: mkdir -p ~/.ssh && chmod 700 ~/.ssh && cp keys/gitpod ~/.ssh/id_ed25519 && cp keys/gitpod.pub ~/.ssh/id_ed25519.pub && chmod 644 ~/.ssh/id_ed25519.pub && chmod 600 ~/.ssh/id_ed25519 + - command: bash ct_scripts/install.sh && sudo /etc/init.d/redis-server start && clear && cat gitpod_readme.md +ports: + - port: 9998 + onOpen: open-browser + - port: 6379 + onOpen: ignore +vscode: + extensions: + - vlanguage.vscode-vlang + - yzhang.markdown-all-in-one + - shd101wyy.markdown-preview-enhanced + - bierner.markdown-mermaid + - darkriszty.markdown-table-prettify + - bpruitt-goddard.mermaid-markdown-syntax-highlighting + - shuworks.vscode-table-formatter +github: + prebuilds: + # enable for the master/default branch (defaults to true) + master: true + # enable for all branches in this repo (defaults to false) + branches: true + # enable for pull requests coming from this repo (defaults to true) + pullRequests: true + # enable for pull requests coming from forks (defaults to false) + pullRequestsFromForks: false + # add a "Review in Gitpod" button as a comment to pull requests (defaults to true) + addComment: true + # add a "Review in Gitpod" button to pull requests (defaults to false) + addBadge: false + # add a label once the prebuild is ready to pull requests (defaults to false) + addLabel: prebuilt-in-gitpod diff --git a/ct_scripts/build_fast.sh b/ct_scripts/build_fast.sh new file mode 100755 index 000000000..1e07229d5 --- /dev/null +++ b/ct_scripts/build_fast.sh @@ -0,0 +1,43 @@ +set -e + +export PUBLISHTOOLSBRANCH=development + +if [ -d "/workspace" ] +then + if ! [ -d "/workspace/publishtools" ] + then + pushd /workspace "$@" > /dev/null + git clone https://github.com/crystaluniverse/publishtools + #which version of publish tools do you want + cd publishtools + git checkout $PUBLISHTOOLSBRANCH + popd "$@" > /dev/null + pushd /workspace/publishtools/scripts_workspace "$@" > /dev/null + bash install.sh + popd "$@" > /dev/null + fi + #build the publishtools + pushd /workspace/publishtools/scripts_workspace "$@" > /dev/null + bash build_fast.sh + popd "$@" > /dev/null +else + if ! [ -d ~/code/publishtools ] + then + pushd ~/code + git clone https://github.com/crystaluniverse/publishtools + #which version of publish tools do you want + cd publishtools + git checkout $PUBLISHTOOLSBRANCH + popd "$@" > /dev/null + # pushd ~/code/publishtools/scripts + # bash build_fast.sh + # popd "$@" > /dev/null + fi + #build the publishtools + pushd ~/code/publishtools/scripts "$@" > /dev/null + bash build_fast.sh + popd "$@" > /dev/null +fi +publishtools develop + + diff --git a/ct_scripts/install.sh b/ct_scripts/install.sh new file mode 100755 index 000000000..fff3daf32 --- /dev/null +++ b/ct_scripts/install.sh @@ -0,0 +1,3 @@ +set -e +sudo /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/crystaluniverse/publishtools/master/scripts/install.sh)" + diff --git a/ct_scripts/install_node.sh b/ct_scripts/install_node.sh new file mode 100755 index 000000000..8738b87b1 --- /dev/null +++ b/ct_scripts/install_node.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +set -ex +sudo chown gitpod:gitpod -R /tmp + +sudo curl -fsSL https://deb.nodesource.com/setup_14.x | sudo -E bash - +sudo apt-get install -y nodejs +node -v + diff --git a/ct_scripts/install_v_rmb.sh b/ct_scripts/install_v_rmb.sh new file mode 100755 index 000000000..3040e43ac --- /dev/null +++ b/ct_scripts/install_v_rmb.sh @@ -0,0 +1,19 @@ +#!/bin/sh +set -ex + +rm -rf v +git clone https://github.com/vlang/v +cd v && make && sudo ./v symlink + +cd / +export PATH=/v:$PATH + +mkdir /root/.vmodules/despiegk +mkdir /root/.vmodules/threefoldtech + +git clone https://github.com/threefoldtech/vgrid /root/.vmodules/threefoldtech/vgrid +git clone https://github.com/threefoldtech/rmb /root/.vmodules/threefoldtech/rmb +git clone https://github.com/crystaluniverse/crystallib /root/.vmodules/despiegk/crystallib + +cd /root/.vmodules/threefoldtech/rmb/msgbusd && sudo v msgbusd.v && sudo cp msgbusd /usr/local/bin + diff --git a/wiki_develop.sh b/wiki_develop.sh new file mode 100755 index 000000000..930b95214 --- /dev/null +++ b/wiki_develop.sh @@ -0,0 +1,3 @@ +cd wiki +bash ../wiki/develop.sh + diff --git a/wiki_publish.sh b/wiki_publish.sh new file mode 100755 index 000000000..1d44ecc38 --- /dev/null +++ b/wiki_publish.sh @@ -0,0 +1,3 @@ +cd wiki +bash ../wiki/publish.sh + diff --git a/wiki_run.sh b/wiki_run.sh new file mode 100755 index 000000000..2ecdf64a0 --- /dev/null +++ b/wiki_run.sh @@ -0,0 +1,3 @@ +cd wiki +bash ../wiki/run.sh +