Skip to content

Commit 62b9338

Browse files
authored
Merge pull request #4 from metacoma/dockerize
Dockerize
2 parents 05cd15e + 8e2ab70 commit 62b9338

File tree

11 files changed

+128
-8
lines changed

11 files changed

+128
-8
lines changed

files/fluentd/shell.conf

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
#<source>
2-
# @type named_pipe
3-
# path /tmp/tmux_fluentd.fifo
4-
# tag tmux
5-
# format none
6-
#</source>
1+
<source>
2+
@type rawtcp
3+
port 42001
4+
tag tmux
5+
format none
6+
</source>
77

88
<match **>
99
@type rawtcp
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
parameters:
3+
kapitan:
4+
compile:
5+
- input_type: jinja2
6+
input_paths:
7+
- templates/bash/functions.bash
8+
output_path: .

inventory/classes/bash/kapitan.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
classes:
3+
- bash.functions
4+
parameters:
5+
bash:
6+
functions:
7+
kapitan_compile: >
8+
(
9+
cd ${kapitan_root}
10+
./kapitan.sh compile -t ${target_name}
11+
)
12+
kapitan_edit_target: >
13+
(
14+
cd ${kapitan_root}
15+
editor `find inventory/targets -type f -name ${target_name}.yml | head -n1`
16+
)
17+

inventory/classes/common.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
parameters:
2+
# TODO(metacoma) create PR to pass compiled_dir into inventory
23
kapitan:
34
vars:
45
target: ${target_name}
6+
7+
kapitan_root: /home/bebebeko/mindwm
8+
compiled_dir: ${kapitan_root}/compiled/${kapitan:vars:target}

inventory/classes/docker/image.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
parameters:
3+
kapitan:
4+
compile:
5+
- input_paths:
6+
- templates/docker
7+
output_path: .
8+
input_type: jinja2
9+
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
---
22
parameters:
3-
mindwm_root: /home/bebebeko/mindwm # ugly
4-
compiled_dir: ${mindwm_root}/compiled/${target_name}/
3+
mindwm:
4+
root: ${kapitan_root} # ugly
5+
runtime:
6+
root: /tmp/mindwm
7+
tmux_dir: ${mindwm:runtime:root}/tmux
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
parameters:
3+
bash:
4+
functions:
5+
tmux_session_start: >
6+
TMUXINATOR_CONFIG=${compiled_dir} tmuxinator start tmuxinator
7+
tmux attach -t ${target_name}
8+
9+
kapitan:
10+
compile:
11+
- input_type: jsonnet
12+
input_paths:
13+
- jsonnet/tmuxinator.jsonnet
14+
output_path: .
15+
output_type: "yml"
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
parameters:
2+
tmuxinator:
3+
root: ${compiled_dir}
4+
windows:
5+
- kapitan:
6+
layout: main-vertical
7+
pre:
8+
- |
9+
. ${compiled_dir}/functions.bash
10+
panes:
11+
- |
12+
kapitan_edit_target
13+
- |
14+
kapitan_compile

inventory/classes/tmuxp/init.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
parameters:
3+
bash:
4+
functions:
5+
tmux_session_start: >
6+
tmuxp load ${compiled_dir}/tmuxinator.yaml
7+

inventory/classes/vim/init.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
parameters:
3+
bash:
4+
functions:
5+
editor:
6+
vim $*

0 commit comments

Comments
 (0)