falkorlib 0.7.11 → 0.7.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/completion/_falkor +13 -1
- data/lib/falkorlib/version.rb +1 -1
- data/templates/vagrant/Vagrantfile.erb +4 -10
- data/templates/vagrant/vagrant/bootstrap.sh +1 -54
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1241d0b0ac6c35f26b8bc4c6cd4590f87da72adc
|
4
|
+
data.tar.gz: 42b0b755cf2d606c68f2f43b3059111842eeac4c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0c3b9749fe46d00311ec2b88d75d93e4f29ce546804902dfa78f021f4c39b8c807b16b05dcb7028600d32b4be8b11d47ff935b460cf441e694311d346d80cf87
|
7
|
+
data.tar.gz: d7cbee49ac0992c9ab5a2148a6e6fa2228eb11eb9fef52f58ae3924c4238028b0890aa02377a17119185c9d3e2b0d7eef3f6e6b4916787028705d1385512586d
|
data/Gemfile.lock
CHANGED
data/completion/_falkor
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#compdef falkor
|
2
2
|
########################################################################################
|
3
3
|
# -*- mode:sh; -*-
|
4
|
-
# Time-stamp: <
|
4
|
+
# Time-stamp: <Fri 2018-04-27 15:36 svarrette>
|
5
5
|
#
|
6
6
|
# ZSH completion for [FalkorLib](https://github.com/Falkor/falkorlib)
|
7
7
|
#
|
@@ -46,6 +46,7 @@ _falkor()
|
|
46
46
|
'mkdocs:Initialize mkdocs for the current project'
|
47
47
|
'motd:bootstrap a Message of the Day (motd) file'
|
48
48
|
'new:Initialize the directory PATH with one of Falkors template(s)'
|
49
|
+
'vagrant:Initialize vagrant in the current project'
|
49
50
|
'version:Prints the FalkorLib version information'
|
50
51
|
)
|
51
52
|
|
@@ -82,6 +83,8 @@ _falkor()
|
|
82
83
|
__falkor_motd && ret=0 ;;
|
83
84
|
(new)
|
84
85
|
__falkor_new && ret=0 ;;
|
86
|
+
(vagrant)
|
87
|
+
__falkor_vagrant && ret=0 ;;
|
85
88
|
(version|*)
|
86
89
|
_nothing
|
87
90
|
;;
|
@@ -279,6 +282,15 @@ __falkor_motd() {
|
|
279
282
|
'*:directory:_files -/'
|
280
283
|
}
|
281
284
|
|
285
|
+
##################
|
286
|
+
__falkor_vagrant() {
|
287
|
+
local curcontext=$curcontext state line ret=1
|
288
|
+
declare -A opt_args
|
289
|
+
|
290
|
+
_arguments -C \
|
291
|
+
{--force,-f}'[Force generation]' \
|
292
|
+
'*:directory:_directories'
|
293
|
+
}
|
282
294
|
|
283
295
|
|
284
296
|
|
data/lib/falkorlib/version.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# -*- mode: ruby -*-
|
2
2
|
# vi: set ft=ruby :
|
3
|
-
# Time-stamp: <Fri 2018-04-27 15:
|
3
|
+
# Time-stamp: <Fri 2018-04-27 15:36 svarrette>
|
4
4
|
###########################################################################################
|
5
5
|
# __ __ _ __ _ _
|
6
6
|
# \ \ / /_ _ __ _ _ __ __ _ _ __ | |_ / _(_) | ___
|
@@ -132,12 +132,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
|
132
132
|
# network settings
|
133
133
|
ipaddr = IPAddr.new network[:range]
|
134
134
|
ip_range = ipaddr.to_range.to_a
|
135
|
-
ip_index =
|
136
|
-
:frontend => 2,
|
137
|
-
:controller => 11,
|
138
|
-
:node => 101,
|
139
|
-
:easybuild => 1,
|
140
|
-
}
|
135
|
+
ip_index = 2
|
141
136
|
|
142
137
|
# cosmetics for the post-up message
|
143
138
|
__table = {
|
@@ -159,9 +154,8 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
|
159
154
|
|
160
155
|
abort "Non-existing box OS '#{os}' for the VM '#{name}'" if settings[:boxes][os.to_sym].nil?
|
161
156
|
abort "Empty IP address range" if ip_range.empty?
|
162
|
-
|
163
|
-
|
164
|
-
ip_index[role.to_sym] += 1 # increment index for the next VM of this type
|
157
|
+
ip = ip_range[ ip_index.to_i ].to_s
|
158
|
+
ip_index += 1 # increment index for the next VM of this type
|
165
159
|
|
166
160
|
config.vm.define "#{name}" do |c|
|
167
161
|
c.vm.box = settings[:boxes][os.to_sym]
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#!/usr/bin/env bash
|
2
|
-
# Time-stamp: <Fri 2018-04-27
|
2
|
+
# Time-stamp: <Fri 2018-04-27 15:53 svarrette>
|
3
3
|
###########################################################################################
|
4
4
|
# __ __ _ ____ _ _
|
5
5
|
# \ \ / /_ _ __ _ _ __ __ _ _ __ | |_ | __ ) ___ ___ | |_ ___| |_ _ __ __ _ _ __
|
@@ -202,57 +202,6 @@ EOF
|
|
202
202
|
EOF
|
203
203
|
}
|
204
204
|
|
205
|
-
setup_easybuild() {
|
206
|
-
cat <<EOF > /etc/profile.d/easybuild.sh
|
207
|
-
export EASYBUILD_PREFIX=\$HOME/.local/easybuild
|
208
|
-
export GLOBAL_EASYBUILD_PREFIX=/opt/apps/
|
209
|
-
export EASYBUILD_MODULES_TOOL=Lmod
|
210
|
-
export EASYBUILD_MODULE_NAMING_SCHEME=CategorizedModuleNamingScheme
|
211
|
-
# Use the below variable to run:
|
212
|
-
# module use $LOCAL_MODULES
|
213
|
-
# module load tools/EasyBuild
|
214
|
-
export LOCAL_MODULES=\$EASYBUILD_PREFIX/modules/all
|
215
|
-
export GLOBAL_MODULES=\$GLOBAL_EASYBUILD_PREFIX/modules/all
|
216
|
-
|
217
|
-
alias ma="module avail"
|
218
|
-
alias ml="module list"
|
219
|
-
function mu(){
|
220
|
-
module use \$GLOBAL_MODULES
|
221
|
-
module use \$LOCAL_MODULES
|
222
|
-
module load tools/EasyBuild
|
223
|
-
}
|
224
|
-
|
225
|
-
# Prepend directories holding eb file for this turorial to the robot path
|
226
|
-
# See http://easybuild.readthedocs.io/en/latest/Using_the_EasyBuild_command_line.html?highlight=EASYBUILD_ROBOT#prepending-and-or-appending-to-the-default-robot-search-path
|
227
|
-
# export EASYBUILD_ROBOT_PATHS=\$(find /vagrant/resources/ -name *.eb | xargs dirname | sort | uniq | xargs echo | tr ' ' ':'):
|
228
|
-
|
229
|
-
alias global_eb='eb --installpath=\$GLOBAL_EASYBUILD_PREFIX'
|
230
|
-
|
231
|
-
EOF
|
232
|
-
pip install --upgrade pip
|
233
|
-
pip install functools32
|
234
|
-
if [ ! -f "${EB_INSTALL_SCRIPT}" ]; then
|
235
|
-
curl -o ${EB_INSTALL_SCRIPT} ${EB_INSTALL_SCRIPT_URL}
|
236
|
-
fi
|
237
|
-
|
238
|
-
info 'Installing Easybuild'
|
239
|
-
sudo -u vagrant EASYBUILD_MODULE_NAMING_SCHEME=CategorizedModuleNamingScheme python ${EB_INSTALL_SCRIPT} ~vagrant/.local/easybuild
|
240
|
-
}
|
241
|
-
|
242
|
-
setup_pyenv() {
|
243
|
-
cat <<EOF > /etc/profile.d/pyenv.sh
|
244
|
-
if [ -d "\$HOME/.pyenv" ]; then
|
245
|
-
export PATH="\$HOME/.pyenv/bin:\$PATH"
|
246
|
-
eval "\$(pyenv init -)"
|
247
|
-
eval "\$(pyenv virtualenv-init -)"
|
248
|
-
fi
|
249
|
-
EOF
|
250
|
-
if [ ! -h "/home/vagrant/.config/direnv" ]; then
|
251
|
-
sudo -u vagrant mkdir -p /home/vagrant/.config
|
252
|
-
sudo -u vagrant ln -sf /vagrant/config/direnv /home/vagrant/.config/direnv
|
253
|
-
fi
|
254
|
-
}
|
255
|
-
|
256
205
|
|
257
206
|
######################################################################################
|
258
207
|
[ $UID -gt 0 ] && error "You must be root to execute this script (current uid: $UID)"
|
@@ -284,5 +233,3 @@ esac
|
|
284
233
|
|
285
234
|
setup_dotfiles
|
286
235
|
setup_motd
|
287
|
-
setup_easybuild
|
288
|
-
setup_pyenv
|