Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keeping master up to date #438

Merged
merged 275 commits into from
Sep 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
275 commits
Select commit Hold shift + click to select a range
bf558f9
fix typos in documentation
jkrue Jan 6, 2023
4ddbe92
add workflow-job to lint python/ansible
jkrue Jan 6, 2023
cd7de77
add more output
jkrue Jan 6, 2023
11d0858
add more output
jkrue Jan 6, 2023
755439e
update runner working directory
jkrue Jan 6, 2023
f499257
make ansible_lint happy
jkrue Jan 6, 2023
c3c416b
rewrite linting workflow
jkrue Jan 6, 2023
7dc5f0a
fix a typo
jkrue Jan 6, 2023
554eb8e
Merge pull request #369 from BiBiServ/#468/requirements
XaverStiensmeier Jan 7, 2023
3487eef
fix pylintrc -> remove ignore-pattern=test/ (not needed, since pylint…
jkrue Jan 7, 2023
34932fa
fixing jinja
XaverStiensmeier Jan 9, 2023
f3c3dc1
Merge pull request #370 from BiBiServ/runner
XaverStiensmeier Jan 9, 2023
788d780
changed jinja
XaverStiensmeier Jan 9, 2023
952ae1a
Fixed wrong when clause
XaverStiensmeier Jan 9, 2023
3ee1537
Removed unnecessary comments and added index implementation
XaverStiensmeier Jan 10, 2023
94c7d7c
this_peer is now used
XaverStiensmeier Jan 10, 2023
dd836ab
Added configuration reload if necessary
XaverStiensmeier Jan 10, 2023
7e3025b
Moved restart to handlers
XaverStiensmeier Jan 10, 2023
c5c4d2d
Added missing handler
XaverStiensmeier Jan 10, 2023
bcde122
Changed to systemd setup
XaverStiensmeier Jan 11, 2023
c15ad2a
Fixed nfs
XaverStiensmeier Jan 11, 2023
2c0b599
Fixed a few bugs more to come
XaverStiensmeier Jan 11, 2023
ab77afb
added some defaults
XaverStiensmeier Jan 11, 2023
58685c2
Added vpn wkr without ip
XaverStiensmeier Jan 16, 2023
dbade5c
removed unnecessary print and fixed typo
XaverStiensmeier Jan 16, 2023
1d46ac5
added vpn counter
XaverStiensmeier Jan 16, 2023
3013726
debugging bug
XaverStiensmeier Jan 16, 2023
1bedd6a
debugging vpnwkr naming is wrong
XaverStiensmeier Jan 16, 2023
4d4e99e
Commenting out worker creation
XaverStiensmeier Jan 16, 2023
7e54fc9
Fixed bug making first worker and numberless
XaverStiensmeier Jan 16, 2023
ffd817b
fixed number order in deletion
XaverStiensmeier Jan 16, 2023
b089d65
vpn workers added to instances.yml
XaverStiensmeier Jan 17, 2023
39aec84
Added key generator for wireguard keys
XaverStiensmeier Jan 17, 2023
f94ce63
Added subnet cidr
XaverStiensmeier Jan 17, 2023
bb247db
Fixing default value bugs
XaverStiensmeier Jan 17, 2023
8ffff29
added identifier
XaverStiensmeier Jan 17, 2023
d6e8859
added identifier as variable and changed providers to access all flavors
XaverStiensmeier Jan 17, 2023
d9faa37
reformatted
XaverStiensmeier Jan 17, 2023
1559f74
slurm
XaverStiensmeier Jan 17, 2023
e1df6fb
fixed ip assigning
XaverStiensmeier Jan 18, 2023
b2c0798
foreign workers are now included in compute nodes
XaverStiensmeier Jan 18, 2023
671ee61
Added vpnwkrs to playbook start
XaverStiensmeier Jan 18, 2023
8803638
Fixed formatting. Added identifier instead of "Test" for wireguard co…
XaverStiensmeier Jan 18, 2023
e0f0d3a
Larger rework of instances file
XaverStiensmeier Jan 18, 2023
fd15c4c
fixing bugs caused by aforementioned rework
XaverStiensmeier Jan 18, 2023
b5f8e24
fixing bugs caused by aforementioned rework
XaverStiensmeier Jan 18, 2023
cda548b
fixing bugs caused by aforementioned rework
XaverStiensmeier Jan 18, 2023
4694c97
fixing bugs caused by aforementioned rework
XaverStiensmeier Jan 18, 2023
ede5e99
cluster_dict no longer needed for ansible configuration
XaverStiensmeier Jan 24, 2023
ff5909b
Changed instances_yml so it allows grouping by cloud
XaverStiensmeier Jan 24, 2023
577b612
Renamed to match jinja extension of other files
XaverStiensmeier Jan 24, 2023
7f45257
instances.master
XaverStiensmeier Jan 24, 2023
d8109cc
instances.master
XaverStiensmeier Jan 24, 2023
24951ac
removed master from instances list and fixed minor bugs.
XaverStiensmeier Jan 24, 2023
e596d7c
Fixed slicing
XaverStiensmeier Jan 24, 2023
2fc2aca
Removed empty vpnworkers list as there can be only one
XaverStiensmeier Jan 24, 2023
8214301
Removed no longer needed import
XaverStiensmeier Jan 24, 2023
d64d5d3
minor reference fixes regarding master and vpn
XaverStiensmeier Jan 24, 2023
6931050
Changed ip to cidr as it should be in nfs exports
XaverStiensmeier Jan 25, 2023
3ec078d
removed faulty space in nfs export entry
XaverStiensmeier Jan 25, 2023
cbded6f
added vpnwkrs to list of nodes to run ansible-playbook on
XaverStiensmeier Jan 25, 2023
8faed0d
added missing vpnwkr
XaverStiensmeier Jan 25, 2023
45333d3
Set default partition
XaverStiensmeier Jan 25, 2023
0175167
Removed default partition as this key doesn't exist
XaverStiensmeier Jan 25, 2023
8706104
default if cloud fits
XaverStiensmeier Jan 25, 2023
72756a4
all credentials will now be stored. Not compatible with save script yet.
XaverStiensmeier Jan 26, 2023
78cede4
fixed wrong parameter type due to ac handling multiple providers now …
XaverStiensmeier Jan 26, 2023
3e5d04d
Fixed cidr bug
XaverStiensmeier Jan 26, 2023
04e2cac
changed cloud_specification to use identifier
XaverStiensmeier Jan 26, 2023
6953ad2
Fixed master not being filtered out due to buggy detection
XaverStiensmeier Jan 26, 2023
b157617
create is now cloud structured but badly implemented (needs asynchron…
XaverStiensmeier Jan 26, 2023
e386f4c
Removed master = none
XaverStiensmeier Jan 26, 2023
86826e4
removed faulty bracket.
XaverStiensmeier Jan 26, 2023
a39861a
Worker start follows cloud structure now
XaverStiensmeier Jan 26, 2023
4d095e0
fixed badly placed assignment of ac_cloud_yaml
XaverStiensmeier Jan 27, 2023
6452eea
replaced no longer fitting regex by an actual exact check using slurm…
XaverStiensmeier Jan 27, 2023
e1d6e44
fixed old variable name leading to hickups
XaverStiensmeier Jan 27, 2023
9ec1c82
Changed nfs exports to add all subnets. Currently not very nice looki…
XaverStiensmeier Jan 27, 2023
e7d6e7f
Added comments and improved variable names.
XaverStiensmeier Jan 30, 2023
1aecdaf
Added delete_server.py routine and connected it to fail.sh (untested).
XaverStiensmeier Jan 30, 2023
677f7a6
Further grouped code and simplified logging.
XaverStiensmeier Jan 30, 2023
4da1fab
fixed minor bugs and added a little bit of logging.
XaverStiensmeier Jan 30, 2023
15ae483
patch for wait for post-launch services to stop
XaverStiensmeier Jan 30, 2023
826eb10
Added private_v4 to configuration implementation. Bit dirty.
XaverStiensmeier Jan 30, 2023
a492a86
Changed nfs for workers back to private_v4. Will crash with vpnwkr as…
XaverStiensmeier Jan 30, 2023
1780930
Added missing instances
XaverStiensmeier Jan 30, 2023
7fa8a1b
add dnsmasq support ( #372 ) (#380)
jkrue Jan 30, 2023
0cff897
fix ansible syntax
jkrue Jan 31, 2023
7abab00
Added wireguard_ip
XaverStiensmeier Jan 31, 2023
a1550b5
wireguard_ip increased by 1 to ignore master
XaverStiensmeier Jan 31, 2023
3b470f5
Added a print for private_v4 to symbolize the start of dns entry crea…
XaverStiensmeier Jan 31, 2023
8013daa
Add support for additional vars file : hosts.yml
jkrue Feb 1, 2023
88f7d09
- extends instances configuration
jkrue Feb 2, 2023
2452156
- remove unused wireguard-worker.yml
jkrue Feb 3, 2023
9589391
Fix program crash when image is not active (#382)
XaverStiensmeier Feb 21, 2023
da338d0
Fix ephemeral not working (#385)
XaverStiensmeier Feb 22, 2023
d131f27
update requirements.txt
jkrue Feb 24, 2023
0ca2dc0
add ConfigurationException
jkrue Feb 28, 2023
2726d0e
Provider and it implementation for Openstack gets another method to a…
jkrue Feb 28, 2023
eae7b04
Remove not longer functions/ code fragments. Add support for extende…
jkrue Feb 28, 2023
010be8d
added hybrid cloud
XaverStiensmeier Mar 1, 2023
fbcbb06
updating check documentation
XaverStiensmeier Mar 1, 2023
d9cc349
updating check documentation
XaverStiensmeier Mar 1, 2023
5303b34
updating check documentation
XaverStiensmeier Mar 1, 2023
3c3eec1
Removed artefact
XaverStiensmeier Mar 1, 2023
2573cbd
Filled text beyond headings
XaverStiensmeier Mar 1, 2023
30c8559
Add security group support to provider and its implementing classes.
jkrue Mar 1, 2023
bacae64
Update create action:
jkrue Mar 1, 2023
97a026f
add wirguard network to list of allowed addresses
jkrue Mar 2, 2023
8ed0226
fix wrong usage of jinja templating
jkrue Mar 2, 2023
b55a3cb
add usage of security groups when creating a worker
jkrue Mar 2, 2023
2608532
fix wireguard systemd network configuration
jkrue Mar 2, 2023
8a4387f
add firewall rules when running in a multi-cloud setup
jkrue Mar 2, 2023
39f910a
add termination of created security groups
jkrue Mar 2, 2023
06f98f7
fix "allowed addresses" when running with more than 2 providers
jkrue Mar 2, 2023
37cc7a6
pin openstacksdk to an older version to avoid deprecation warnings.
jkrue Mar 3, 2023
b567638
not working, but best possible merge for now. Detailed fix will happe…
XaverStiensmeier Mar 3, 2023
bbb62b5
Added host file solution for vpnwkrs. Moved wireguard to configuration.
XaverStiensmeier Mar 6, 2023
1d1f3f4
Added host vars to deletion process and fixed vpnwkrs using group var…
XaverStiensmeier Mar 6, 2023
59e3fbb
Fixing structural changes due to merge
XaverStiensmeier Mar 6, 2023
9910867
Fixed vpn workers getting lost
XaverStiensmeier Mar 6, 2023
3ebbb71
fixed merge bug, improved data structure ansible/jinja
XaverStiensmeier Mar 6, 2023
0cfc1da
Removed another bug regarding passing too many arguments.
XaverStiensmeier Mar 6, 2023
9bc9234
removed delay for now
XaverStiensmeier Mar 7, 2023
a4900a8
fixed worker count
XaverStiensmeier Mar 7, 2023
0ffffcd
fixed wireguard
XaverStiensmeier Mar 7, 2023
505f106
Added reattempt for ConflictException still not perfect.
XaverStiensmeier Mar 8, 2023
7501b89
Further fixed vpnwkr merge issues
XaverStiensmeier Mar 8, 2023
11f0fbf
Adapted command to new group vpn that contains both master and vpnwkr
XaverStiensmeier Mar 8, 2023
b7f4d58
Fixed wireguard ip bug
XaverStiensmeier Mar 13, 2023
107b268
fixed bug wireguard not installed on vpn-worker
XaverStiensmeier Mar 13, 2023
c56fc6d
Changed "local" to "ssh" in order to avoid sudo right issue on master.
XaverStiensmeier Mar 15, 2023
1f9071c
fixed group name?
XaverStiensmeier Mar 15, 2023
02e7473
adapted timeout to experiences
XaverStiensmeier Mar 15, 2023
9e08a74
fixed group name now using "-" instead of ":"
XaverStiensmeier Mar 20, 2023
c943472
fixed userdata being list cause of using readlines instead of read. N…
XaverStiensmeier Mar 20, 2023
f84c863
group name cannot contain '-' therefore switched to underscores. Mayb…
XaverStiensmeier Mar 20, 2023
bd149c9
Make all clouds default
XaverStiensmeier Mar 20, 2023
a3bd876
first draft add ip routes
XaverStiensmeier Mar 20, 2023
ede600e
Added ip routes to main.yml
XaverStiensmeier Mar 21, 2023
38507d2
Changed ip route registration to make use of linux network files
XaverStiensmeier Mar 21, 2023
6b40041
Workers now save the gateway_ip (private_v4 of master or vpnwkr). Als…
XaverStiensmeier Mar 21, 2023
6bbc691
now using common variable wireguard_common instead of group_var wireg…
XaverStiensmeier Mar 21, 2023
3a3f4d4
Added rights.
XaverStiensmeier Mar 21, 2023
26f68ba
Disabling netplan and going full networkd
XaverStiensmeier Mar 22, 2023
298d69b
Disabling cloud network changes after initialization
XaverStiensmeier Mar 22, 2023
801bf52
Added netplan deactivation
XaverStiensmeier Mar 27, 2023
87d7672
Fixed connection issues
XaverStiensmeier Mar 27, 2023
6124f7a
Added missing handler and added a task that updates the host file on …
XaverStiensmeier Mar 27, 2023
53ddf4f
Fixed minor bad namings and added missing ".yaml" extension to task file
XaverStiensmeier Mar 28, 2023
666c480
Added implementation of "bibiname" a short script that allows node na…
XaverStiensmeier Mar 28, 2023
e2e54a8
fixed name issue regarding slurm user executing ansible. Now master n…
XaverStiensmeier Mar 28, 2023
145fd9f
renamed task to "generate bibiname script"
XaverStiensmeier Mar 28, 2023
4099fa2
Adapted scripts to meet hybrid cloud solution
XaverStiensmeier Mar 28, 2023
9cbdebd
Added delete_server.py script to bin copied files
XaverStiensmeier Mar 28, 2023
0eaaf03
fixed fail and terminate script
XaverStiensmeier Mar 29, 2023
e1bcb27
changed terminate script to timeout delete
XaverStiensmeier Mar 29, 2023
6ed0bb0
fixed minor code issues
XaverStiensmeier Mar 29, 2023
a12afe9
fixed linting issues delete_server.py
XaverStiensmeier Mar 29, 2023
5edec3e
fixed linting issues provider.py
XaverStiensmeier Mar 29, 2023
eb4d60d
fixed linting issues startup_tests.py
XaverStiensmeier Mar 29, 2023
d2d0b8b
fixed linting issues
XaverStiensmeier Mar 29, 2023
baddbc2
fixed linting issues
XaverStiensmeier Apr 3, 2023
8b7dd3d
fixed typo
XaverStiensmeier Apr 3, 2023
3dffbee
fixed termination ConflictException not caught
XaverStiensmeier Apr 3, 2023
4901b9d
Added basic structure for multi_cloud.md
XaverStiensmeier Apr 5, 2023
66f069c
Added elixir compute presentation as an additional light-weight read.
XaverStiensmeier Apr 5, 2023
7ae45df
added this file that - in the future - maybe should hold information …
XaverStiensmeier Apr 5, 2023
a40b4cf
Added basic wireguard.md documentation
XaverStiensmeier Apr 5, 2023
4449f32
fixed grammar
XaverStiensmeier Apr 5, 2023
7ebcb84
removed redundant warning
XaverStiensmeier Apr 5, 2023
1ea0d2a
added dnsmasq documentation structure
XaverStiensmeier Apr 5, 2023
669e464
removed encryption
XaverStiensmeier Apr 5, 2023
89c9208
updated purpose description
XaverStiensmeier Apr 5, 2023
f2bc102
update DNS
XaverStiensmeier Apr 5, 2023
2773be4
now creating empty hosts.yml file in order to allow ansible execution
XaverStiensmeier Apr 12, 2023
dccd130
Remove entire vars folder
XaverStiensmeier Apr 12, 2023
37d6592
fixed path
XaverStiensmeier Apr 12, 2023
d05b411
changed provider.NAME provider.cloud_specification['identifier']
XaverStiensmeier Apr 14, 2023
7d4a787
Removed vpnwkr from slurm as it should only be used to establish conn…
XaverStiensmeier Apr 14, 2023
438ddff
Decoupled for loop worker ansible host creation from vpnwkr host crea…
XaverStiensmeier Apr 14, 2023
79a5374
fixed vpnwkr still being added to the partition even though the node …
XaverStiensmeier Apr 14, 2023
5b68c2c
Fixed bug in bibiname.j2 that gave master a number (master never has …
XaverStiensmeier Apr 17, 2023
1a707e8
removed all references to the instances.master
XaverStiensmeier Apr 21, 2023
a305701
removed further references to instances.yml and fixed bugs appearing …
XaverStiensmeier Apr 21, 2023
40020c7
fixed slurm.conf creating NodeName duplicates. Still unordered.
XaverStiensmeier Apr 24, 2023
be8ff54
Added all partition
XaverStiensmeier Apr 24, 2023
2ab8ee5
Merge branch 'master' into dev
XaverStiensmeier Apr 25, 2023
8857628
Merge branch 'dev' of github.com:BiBiServ/bibigrid into dev
XaverStiensmeier Apr 25, 2023
956034c
Removed instances.yml from create_server.py
XaverStiensmeier May 5, 2023
93c6d24
Removed instances.yml from delete_server.py
XaverStiensmeier May 5, 2023
e031d7f
removed last remains of instance.yml
XaverStiensmeier May 12, 2023
8075fc1
Merge pull request #404 from BiBiServ/397-remove-instances.yml
XaverStiensmeier May 12, 2023
0ebea25
Servers are now created asynchronously.
XaverStiensmeier May 12, 2023
3ba4207
Merge branch 'dev' into 400-asynchrone-server-creation
XaverStiensmeier May 12, 2023
482efe3
Merge pull request #405 from BiBiServ/400-asynchrone-server-creation
XaverStiensmeier May 12, 2023
447fe4a
Merge branch 'dev' into update-documentation
XaverStiensmeier May 12, 2023
0388847
Merge pull request #406 from BiBiServ/update-documentation
XaverStiensmeier May 12, 2023
83cd0e9
Fixed rest error
XaverStiensmeier May 12, 2023
4ca0902
Merge pull request #407 from BiBiServ/387-fix-slurm-documentation
XaverStiensmeier May 12, 2023
97882f4
Added support for feature in slurm.conf
XaverStiensmeier May 19, 2023
04d0280
Putting features into group_vars
XaverStiensmeier May 19, 2023
7c94863
Updated configuration.md documentation to mention new feature "featur…
XaverStiensmeier May 19, 2023
4ba0f83
Added merge information and updates bibigrid.yml accordingly
XaverStiensmeier May 19, 2023
0e974cd
added features to master and workergroups
XaverStiensmeier May 19, 2023
22b4d4c
fixed features not added as string to slurm.conf
XaverStiensmeier May 19, 2023
6cc93a5
Merge pull request #408 from BiBiServ/398-feature-passing
XaverStiensmeier May 19, 2023
9cededd
added missing empty line
XaverStiensmeier May 19, 2023
aa64818
Now a single string instead of a list of features is understood as well.
XaverStiensmeier May 19, 2023
d036c45
Merge pull request #410 from BiBiServ/allowsinglestring_features
XaverStiensmeier May 19, 2023
2d4a1d3
Improved cloud_identifier selection and documented the new way: picki…
XaverStiensmeier May 22, 2023
a225371
updated configuration.md and removed many inaccuracies
XaverStiensmeier May 22, 2023
14c30c7
changed instances to instance for instance creation as workers are no…
XaverStiensmeier May 22, 2023
cd9cb4f
Improved create.md
XaverStiensmeier May 22, 2023
b02e910
Improved naming of subparagraph
XaverStiensmeier May 22, 2023
57ebc6a
Fixed indentation, readability and documentation
XaverStiensmeier May 22, 2023
9bb4b8c
Improved logging information.
XaverStiensmeier May 24, 2023
f823b60
Improved logging
XaverStiensmeier May 24, 2023
027c978
Added warning message when configuration is not list.
XaverStiensmeier May 24, 2023
cf337ec
added configuration list parameter
XaverStiensmeier May 25, 2023
087ebfb
Added logging when network or subnet couldn't be set
XaverStiensmeier May 25, 2023
d42e1a9
Improved logging of ConfigurationExceptions
XaverStiensmeier May 25, 2023
fcc1c79
Improved documentation. Removed unnecessary variable in ide
XaverStiensmeier May 26, 2023
b0cfad4
Improved documentation.
XaverStiensmeier May 26, 2023
1478f8c
Added brief information regarding wireguard and zabbix
XaverStiensmeier May 26, 2023
798a4fc
changed vpnwkr to vpngtw
XaverStiensmeier May 26, 2023
25fcdbc
Fixed security group deletion for not multi-cloud clusters.
XaverStiensmeier May 26, 2023
d0bc935
Merge pull request #415 from BiBiServ/update_documentation
XaverStiensmeier May 26, 2023
dcc3cb2
Addendum: Removed worker groups and slightly streamlined id generation
XaverStiensmeier Jun 6, 2023
fcf59b1
Merge branch 'dev' into update_documentation
XaverStiensmeier Jun 6, 2023
3669e39
Merge pull request #417 from BiBiServ/update_documentation
XaverStiensmeier Jun 6, 2023
db5781f
Added public to key one in the comment for sshPublicKeyFiles
XaverStiensmeier Jun 6, 2023
cfe22a0
fixed bibiname.j2 to new naming convention
XaverStiensmeier Jun 9, 2023
b0434e5
improved command_line_interpreter.py by making -i optional (not neede…
XaverStiensmeier Jul 20, 2023
c795c39
Improved version message by adding additional information - including…
XaverStiensmeier Jul 20, 2023
c8bd80b
Changed Universität to University, excluded keys folder
XaverStiensmeier Jul 20, 2023
9a85e96
Merge pull request #420 from BiBiServ/improve-cli
XaverStiensmeier Jul 20, 2023
55aeb7e
Volume information is passed into ansible configuration now
XaverStiensmeier Aug 1, 2023
8aee3f5
Added automatic mounting for drives. Needs thorough testing.
XaverStiensmeier Aug 2, 2023
77246a8
Added newline at end of file
XaverStiensmeier Aug 2, 2023
745b56b
reduced to 'file'
XaverStiensmeier Aug 2, 2023
863aab1
made provider.py use abc (abstract class)
XaverStiensmeier Aug 2, 2023
a865e84
added default false condition autoMount for automatic mounting. Impro…
XaverStiensmeier Aug 3, 2023
de741de
Added documentation.
XaverStiensmeier Aug 3, 2023
abc4cf6
capitalized the warning so it is harder to miss.
XaverStiensmeier Aug 3, 2023
6b26d2a
Merge pull request #421 from BiBiServ/volumes-auto-mount
XaverStiensmeier Aug 7, 2023
8bdd30c
Auto image picker (#429)
XaverStiensmeier Sep 18, 2023
af63c6d
423 rest api prototype (#437)
XaverStiensmeier Sep 21, 2023
188e170
Merge branch 'master' into dev
XaverStiensmeier Sep 28, 2023
93cbdd7
removed unnecessary print
XaverStiensmeier Sep 28, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ resources/playbook/group_vars/

# any log files
*.log
log/

# Byte-compiled / optimized / DLL files
__pycache__/
Expand Down
1 change: 1 addition & 0 deletions bibigrid.sh
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
#!/bin/bash
python3 -m bibigrid.core.startup "$@"
18 changes: 14 additions & 4 deletions bibigrid.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# See https://cloud.denbi.de/wiki/Tutorials/BiBiGrid/ (after update)
# See https://github.com/BiBiServ/bibigrid/blob/master/documentation/markdown/features/configuration.md
# First configuration also holds general cluster information and must include the master.
# All other configurations mustn't include another master, but exactly one vpngtw instead (keys like master).

Expand All @@ -8,9 +9,10 @@
# -- BEGIN: GENERAL CLUSTER INFORMATION --
## sshPublicKeyFiles listed here will be added to access the cluster. A temporary key is created by bibigrid itself.
#sshPublicKeyFiles:
# - [key one]
# - [public key one]

## Volumes and snapshots that will be mounted to master
# autoMount: False # WARNING: will overwrite unidentified filesystems
#masterMounts: # KEY NOT FULLY IMPLEMENTED YET
# - [mount one]

Expand All @@ -36,13 +38,15 @@

## Uncomment if you don't want assign a public ip to the master; for internal cluster (Tuebingen).
#useMasterWithPublicIp: False # defaults True if False no public-ip (floating-ip) will be allocated
# deleteTmpKeypairAfter: False
# dontUploadCredentials: False

# Other keys - default False
#localFS: True
#localDNSlookup: True
#zabbix: True
#nfs: True
#ide: True # Very useful to set on True. Use `./bibigrid.sh -i [path-to-bibigrid.yml] -ide -cid [cluster-id]` to start port forwarding to access the ide.
#ide: True # A nice way to view your cluster as if you were using Visual Studio Code

useMasterAsCompute: True # Currently ignored by slurm

Expand All @@ -52,15 +56,17 @@
# master configuration
masterInstance:
type: # existing type/flavor on your cloud. See launch instance>flavor for options
image: # existing image on your cloud. See https://openstack.cebitec.uni-bielefeld.de/project/images pick an active one. Currently only ubuntu22.04 is supported
image: # existing active image on your cloud. Consider using regex to prevent image updates from breaking your running cluster
# features: # list

# -- END: GENERAL CLUSTER INFORMATION --

# fallbackOnOtherImage: False # if True, most similar image by name will be picked. A regex can also be given instead.

# worker configuration
#workerInstances:
# - type: # existing type/flavor on your cloud. See launch instance>flavor for options
# image: # same as master
# image: # same as master. Consider using regex to prevent image updates from breaking your running cluster
# count: # any number of workers you would like to create with set type, image combination
# # features: # list

Expand All @@ -87,6 +93,10 @@

# Depends on cloud site and project
subnet: # existing subnet on your cloud. See https://openstack.cebitec.uni-bielefeld.de/project/networks/
# or network:
# gateway: # if you want to use a gateway for create.
# ip: # IP of gateway to use
# portFunction: 30000 + oct4 # variables are called: oct1.oct2.oct3.oct4

# Uncomment if no full DNS service for started instances is available.
# Currently, the case in Berlin, DKFZ, Heidelberg and Tuebingen.
Expand Down
12 changes: 5 additions & 7 deletions bibigrid/core/actions/check.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
"""
Module that acts as a wrapper and uses validate_configuration to validate given configuration
"""
import logging
from bibigrid.core.utility import validate_configuration

LOG = logging.getLogger("bibigrid")


def check(configurations, providers):
def check(configurations, providers, log):
"""
Uses validate_configuration to validate given configuration.
:param configurations: list of configurations (dicts)
:param providers: list of providers
:param log:
:return:
"""
success = validate_configuration.ValidateConfiguration(configurations, providers).validate()
success = validate_configuration.ValidateConfiguration(configurations, providers, log).validate()
check_result = "succeeded! Cluster is ready to start." if success else "failed!"
print(f"Total check {check_result}")
LOG.info("Total check returned %s.", success)
log.log(42, f"Total check {check_result}")
log.info("Total check returned %s.", success)
return 0
181 changes: 104 additions & 77 deletions bibigrid/core/actions/create.py

Large diffs are not rendered by default.

40 changes: 21 additions & 19 deletions bibigrid/core/actions/ide.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@
This module contains methods to establish port forwarding in order to access an ide (theia).
"""

import logging
import random
import re
import signal
import subprocess
import sys
import time
import webbrowser

import sshtunnel
import sympy

from bibigrid.core.utility.handler import cluster_ssh_handler

Expand All @@ -20,7 +21,7 @@
LOCAL_BIND_ADDRESS = 9191
MAX_JUMP = 100
LOCALHOST = "127.0.0.1"
LOG = logging.getLogger("bibigrid")



def sigint_handler(caught_signal, frame): # pylint: disable=unused-argument
Expand Down Expand Up @@ -49,37 +50,38 @@ def is_used(ip_address):
for line in lines:
is_open = re.match(rf'tcp.*{ip_address}:([0-9][0-9]*).*ESTABLISHED\s*$', line)
if is_open is not None:
print(line)
ports_used.append(is_open[1])


def ide(cluster_id, master_provider, master_configuration):
def ide(cluster_id, master_provider, master_configuration, log):
"""
Creates a port forwarding from LOCAL_BIND_ADDRESS to REMOTE_BIND_ADDRESS from localhost to master of specified
cluster
@param cluster_id: cluster_id or ip
@param master_provider: master's provider
@param master_configuration: master's configuration
@param log:
@return:
"""
LOG.info("Starting port forwarding for ide")
log.info("Starting port forwarding for ide")
master_ip, ssh_user, used_private_key = cluster_ssh_handler.get_ssh_connection_info(cluster_id, master_provider,
master_configuration)
master_configuration, log)
used_local_bind_address = LOCAL_BIND_ADDRESS
if master_ip and ssh_user and used_private_key:
attempts = 0
if master_configuration.get("gateway"):
octets = {f'oct{enum + 1}': int(elem) for enum, elem in enumerate(master_ip.split("."))}
port = sympy.sympify(master_configuration["gateway"]["portFunction"]).subs(dict(octets))
gateway = (master_configuration["gateway"]["ip"], int(port))
else:
gateway = None
while attempts < 16:
attempts += 1
try:
with sshtunnel.SSHTunnelForwarder(
ssh_address_or_host=master_ip, # Raspberry Pi in my network

ssh_username=ssh_user,
ssh_pkey=used_private_key,

local_bind_address=(LOCALHOST, used_local_bind_address),
remote_bind_address=(LOCALHOST, REMOTE_BIND_ADDRESS)
) as server:
with sshtunnel.SSHTunnelForwarder(ssh_address_or_host=gateway or master_ip, ssh_username=ssh_user,
ssh_pkey=used_private_key,
local_bind_address=(LOCALHOST, used_local_bind_address),
remote_bind_address=(LOCALHOST, REMOTE_BIND_ADDRESS)) as server:
print("CTRL+C to close port forwarding when you are done.")
with server:
# opens in existing window if any default program exists
Expand All @@ -88,11 +90,11 @@ def ide(cluster_id, master_provider, master_configuration):
time.sleep(5)
except sshtunnel.HandlerSSHTunnelForwarderError:
used_local_bind_address += random.randint(1, MAX_JUMP)
LOG.info("Attempt: %s. Port in use... Trying new port %s", attempts, used_local_bind_address)
log.info("Attempt: %s. Port in use... Trying new port %s", attempts, used_local_bind_address)
if not master_ip:
LOG.warning("Cluster id %s doesn't match an existing cluster with a master.", cluster_id)
log.warning("Cluster id %s doesn't match an existing cluster with a master.", cluster_id)
if not ssh_user:
LOG.warning("No ssh user has been specified in the first configuration.")
log.warning("No ssh user has been specified in the first configuration.")
if not used_private_key:
LOG.warning("No matching sshPublicKeyFiles can be found in the first configuration or in .bibigrid")
log.warning("No matching sshPublicKeyFiles can be found in the first configuration or in .bibigrid")
return 1
60 changes: 32 additions & 28 deletions bibigrid/core/actions/list_clusters.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@
This includes a method to create a dictionary containing all running clusters and their servers.
"""

import logging
import pprint
import re

from bibigrid.core.actions import create

SERVER_REGEX = re.compile(r"^bibigrid-((master)-([a-zA-Z0-9]+)|(worker|vpngtw)\d+-([a-zA-Z0-9]+)-\d+)$")
LOG = logging.getLogger("bibigrid")

def dict_clusters(providers):

def dict_clusters(providers, log):
"""
Creates a dictionary containing all servers by type and provider information
:param providers: list of all providers
:param log:
:return: list of all clusters in yaml format
"""
LOG.info("Creating cluster dictionary...")
log.info("Creating cluster dictionary...")
cluster_dict = {}
for provider in providers:
servers = provider.list_servers()
Expand Down Expand Up @@ -53,56 +53,59 @@ def setup(cluster_dict, cluster_id, server, provider):
server["cloud_specification"] = provider.cloud_specification["identifier"]


def print_list_clusters(cluster_id, providers):
def log_list(cluster_id, providers, log):
"""
Calls dict_clusters and gives a visual representation of the found cluster.
Detail depends on whether a cluster_id is given or not.
:param cluster_id:
:param providers:
:param log:
:return:
"""
cluster_dict = dict_clusters(providers=providers)
if cluster_id: # pylint: disable=too-many-nested-blocks
cluster_dict = dict_clusters(providers=providers, log=log)
if cluster_id: # pylint: disable=too-many-nested-blocks
if cluster_dict.get(cluster_id):
LOG.info("Printing specific cluster_dictionary")
master_count, worker_count, vpn_count = get_size_overview(cluster_dict[cluster_id])
print(f"\tCluster has {master_count} master, {vpn_count} vpngtw and {worker_count} regular workers. "
f"The cluster is spread over {vpn_count + master_count} reachable provider(s).")
log.info("Printing specific cluster_dictionary")
master_count, worker_count, vpn_count = get_size_overview(cluster_dict[cluster_id], log)
log.log(42, f"\tCluster has {master_count} master, {vpn_count} vpngtw and {worker_count} regular workers. "
f"The cluster is spread over {vpn_count + master_count} reachable provider(s).")
pprint.pprint(cluster_dict[cluster_id])
else:
LOG.info("Cluster with cluster-id {cluster_id} not found.")
print(f"Cluster with cluster-id {cluster_id} not found.")
log.info("Cluster with cluster-id {cluster_id} not found.")
log.log(42, f"Cluster with cluster-id {cluster_id} not found.")
else:
LOG.info("Printing overview of cluster all clusters")
log.info("Printing overview of cluster all clusters")
if cluster_dict:
for cluster_key_id, cluster_node_dict in cluster_dict.items():
print(f"Cluster-ID: {cluster_key_id}")
log.log(42, f"Cluster-ID: {cluster_key_id}")
master = cluster_node_dict.get('master')
if master:
for key in ["name", "user_id", "launched_at", "key_name", "public_v4", "public_v6", "provider"]:
value = cluster_node_dict['master'].get(key)
if value:
print(f"\t{key}: {value}")
log.log(42, f"\t{key}: {value}")
security_groups = get_security_groups(cluster_node_dict)
print(f"\tsecurity_groups: {security_groups}")
log.log(42, f"\tsecurity_groups: {security_groups}")
networks = get_networks(cluster_node_dict)
print(f"\tnetwork: {pprint.pformat(networks)}")
log.log(42, f"\tnetwork: {pprint.pformat(networks)}")
else:
LOG.warning("No master for cluster: %s.", cluster_key_id)
master_count, worker_count, vpn_count = get_size_overview(cluster_node_dict)
print(f"\tCluster has {master_count} master, {vpn_count} vpngtw and {worker_count} regular workers. "
f"The cluster is spread over {vpn_count + master_count} reachable provider(s).")
log.warning("No master for cluster: %s.", cluster_key_id)
master_count, worker_count, vpn_count = get_size_overview(cluster_node_dict, log)
log.log(42,
f"\tCluster has {master_count} master, {vpn_count} vpngtw and {worker_count} regular workers. "
f"The cluster is spread over {vpn_count + master_count} reachable provider(s).")
else:
print("No cluster found.")
log.log(42, "No cluster found.")
return 0


def get_size_overview(cluster_dict):
def get_size_overview(cluster_dict, log):
"""
:param cluster_dict: dictionary of cluster to size_overview
:param log:
:return: number of masters, number of workers, number of vpns
"""
LOG.info("Printing size overview")
log.info("Printing size overview")
master_count = int(bool(cluster_dict.get("master")))
worker_count = len(cluster_dict.get("workers") or "")
vpn_count = len(cluster_dict.get("vpngtws") or "")
Expand Down Expand Up @@ -135,19 +138,20 @@ def get_security_groups(cluster_dict):
return security_groups


def get_master_access_ip(cluster_id, master_provider):
def get_master_access_ip(cluster_id, master_provider, log):
"""
Returns master's ip of cluster cluster_id
:param master_provider: master's provider
:param cluster_id: Id of cluster
:param log:
:return: public ip of master
"""
LOG.info("Finding master ip for cluster %s...", cluster_id)
log.info("Finding master ip for cluster %s...", cluster_id)
servers = master_provider.list_servers()
for server in servers:
master = create.MASTER_IDENTIFIER(cluster_id=cluster_id)
if server["name"].startswith(master):
return server.get("public_v4") or server.get("public_v6") or server.get("private_v4")
LOG.warning("Cluster %s not found on master_provider %s.", cluster_id,
log.warning("Cluster %s not found on master_provider %s.", cluster_id,
master_provider.cloud_specification["identifier"])
return None
Loading