Created
November 28, 2020 10:59
-
-
Save metacoma/0c33ba155e85efff3eb63bf52f2a7748 to your computer and use it in GitHub Desktop.
tmuxinator magic
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 9mine-periodic-table-fs | |
root: ~/spaces/mine9/charts/charts/9p-execfuse-jinja2 | |
startup_window: 9mine-periodic-table-fs | |
on_project_start: "grep -q '^set -g pane-border-status top$' ~/.tmux.conf 2>/dev/null || echo 'set -g pane-border-status top' >> ~/.tmux.conf" | |
APPLY_KUBECONFIG: &APPLY_KUBECONFIG | |
- cd ~/spaces/mine9/kapitan-9mine/compiled/${ENV_NAME}/conf/ | |
- . ./activate.sh | |
PRE: &PRE | |
- alias pane_title="printf '\033]2;%s\033\\' $1" | |
- alias tmux_layout="tmux list-windows | sed -Ern '/\*/ {s/.*layout ([^]]+).*/\1/p}'" | |
windows: | |
- config: | |
pre: | |
- *PRE | |
panes: | |
- | |
- pane_title tmuxinator | |
- unset TMUX | |
- tmux attach -t 9mine-periodic-table-fs-editor || tmux new -s 9mine-periodic-table-fs-editor 'tmuxinator edit 9mine-periodic-table-fs' | |
- 9mine-periodic-table-fs: | |
pre: | |
- *PRE | |
- cd ~/spaces/mine9/execfuse-jinja2 | |
panes: | |
- | |
- #jinja2 examples/periodic_table.yml | docker run -v`pwd`/execfuse-jinja2 --rm -i dievri/execfuse-jinja2:feature_lua_handlers periodic_table | tar xvf - -C periodic_table/ --strip | |
- | |
- | |
- unset TMUX | |
- while :; do tmux attach -t 9mine-periodic-table-fs-editor; sleep 1; done | |
- | |
- | | |
cat<<EOF | |
# build | |
docker build -t dievri/execfuse-jinja2:feature_lua_handlers . | |
# run | |
docker run -v/home/bebebeko/spaces/mine9/execfuse-jinja2/execfuse-jinja2 --entrypoint /bin/sh --rm -it dievri/execfuse-jinja2:feature_lua_handlers -c /bin/bash | |
----------------------- | |
# render | |
jinja2 examples/periodic_table.yml | docker run -v`pwd`/execfuse-jinja2 --rm -i dievri/execfuse-jinja2:feature_lua_handlers periodic_table | tar xvf - -C periodic_table/ --strip 1 | |
------------------------ | |
EOF | |
- | |
- chart: | |
pre: | |
- export ENV_NAME=dev | |
- *PRE | |
- *APPLY_KUBECONFIG | |
- kubectl config set-context --current --namespace=9mine | |
- cd ~/spaces/mine9/charts/charts/9p-execfuse-jinja2 | |
panes: | |
- | |
- kubectl exec -ti infernodebug -- /bin/bash | |
- emu-g | |
- | | |
load std; | |
ndb/cs; | |
test -d /mnt/registry || mkdir /mnt/registry; | |
mount -A tcp!registry!registry /mnt/registry | |
- | |
- unset TMUX | |
- while :; do tmux attach -t 9mine-periodic-table-fs-editor; sleep 1; done | |
- | |
- # helm upgrade -n 9mine --install periodic-table-fs . -f ./values.yaml | |
- POD_NAME=`kubectl get pods -l app.kubernetes.io/instance=periodic-table-fs -o jsonpath='{.items[*].metadata.name}'` | |
- kubectl logs ${POD_NAME} -c 9p-execfuse-jinja2-execfuse-jinja2 | |
- kubectl exec -ti ${POD_NAME} -- /bin/sh | |
- 9mine-repo: | |
pre: | |
- export ENV_NAME=dev | |
- *PRE | |
- *APPLY_KUBECONFIG | |
- kubectl config set-context --current --namespace=9mine | |
- cd ~/spaces/mine9/9mine-periodic-table | |
- export IMAGE=dievri/9mine-periodic-table:feature_lua_handlers | |
panes: | |
- | |
- kubectl exec -ti infernodebug -- /bin/bash | |
- emu-g | |
- | | |
load std; | |
ndb/cs; | |
test -d /mnt/registry || mkdir /mnt/registry; | |
mount -A tcp!registry!registry /mnt/registry | |
- | |
- unset TMUX | |
- while :; do tmux attach -t 9mine-periodic-table-fs-editor; sleep 1; done | |
- | |
- # helm upgrade -n 9mine --install periodic-table-fs . -f ./values.yaml | |
- # kubectl run -it --rm --image $IMAGE test-9mine --command /bin/sh -- | |
# docker run --rm -it --device /dev/fuse --cap-add SYS_ADMIN --privileged --entrypoint /bin/sh ${IMAGE} -c /bin/sh | |
- POD_NAME=`kubectl get pods -l app.kubernetes.io/instance=periodic-table-fs -o jsonpath='{.items[*].metadata.name}'` | |
- kubectl logs ${POD_NAME} -c 9p-execfuse-jinja2-execfuse-jinja2 | |
- kubectl exec -ti ${POD_NAME} -- /bin/sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: <%= name %> | |
root: . | |
startup_window: <%= name %> | |
on_project_start: "grep -q '^set -g pane-border-status top$' ~/.tmux.conf 2>/dev/null || echo 'set -g pane-border-status top' >> ~/.tmux.conf" | |
PRE: &PRE | |
- alias pane_title="printf '\033]2;%s\033\\' $1" | |
- alias tmux_layout="tmux list-windows | sed -Ern '/\*/ {s/.*layout ([^]]+).*/\1/p}'" | |
windows: | |
- config: | |
pre: | |
- *PRE | |
panes: | |
- | |
- pane_title tmuxinator | |
- unset TMUX | |
- tmux attach -t <%= name %>-editor || tmux new -s <%= name %>-editor 'tmuxinator edit <%= name %>' | |
- <%= name %>: | |
pre: | |
- *PRE | |
panes: | |
- | |
- | |
- | |
- | |
- unset TMUX | |
- while :; do tmux attach -t <%= name %>-editor; sleep 1; done | |
- | |
- | |
- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment