Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
despiegk committed Jul 27, 2021
1 parent c8ff9a9 commit f08270f
Show file tree
Hide file tree
Showing 10 changed files with 157 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -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
23 changes: 23 additions & 0 deletions .gitpod.Dockerfile
Original file line number Diff line number Diff line change
@@ -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
36 changes: 36 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -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
43 changes: 43 additions & 0 deletions ct_scripts/build_fast.sh
Original file line number Diff line number Diff line change
@@ -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


3 changes: 3 additions & 0 deletions ct_scripts/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
set -e
sudo /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/crystaluniverse/publishtools/master/scripts/install.sh)"

9 changes: 9 additions & 0 deletions ct_scripts/install_node.sh
Original file line number Diff line number Diff line change
@@ -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

19 changes: 19 additions & 0 deletions ct_scripts/install_v_rmb.sh
Original file line number Diff line number Diff line change
@@ -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

3 changes: 3 additions & 0 deletions wiki_develop.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
cd wiki
bash ../wiki/develop.sh

3 changes: 3 additions & 0 deletions wiki_publish.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
cd wiki
bash ../wiki/publish.sh

3 changes: 3 additions & 0 deletions wiki_run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
cd wiki
bash ../wiki/run.sh

0 comments on commit f08270f

Please sign in to comment.