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

Integrate Trailblazing Turtle via Puppetfile #349

Open
wants to merge 28 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
9498124
Adding profile for userportal
guilbaults Oct 7, 2022
2cabe4f
Adding userportal to reverse proxy
guilbaults Oct 11, 2022
750682c
Using port 9000 for apache since its allowed by SELinux and fixing vhost
guilbaults Oct 13, 2022
564c12e
Define unique userportal password in bootstrap script
cmd-ntrf Jan 17, 2023
06ded2b
Configure prometheus and database server in 99-local.py
cmd-ntrf Jan 23, 2023
f7a34e7
Fix db_ip in common.yaml
cmd-ntrf Jan 25, 2023
e8510c7
Separate slurm_jobscripts from userportal server
cmd-ntrf Aug 16, 2023
ed2f995
Remove hardcoded host
cmd-ntrf Aug 17, 2023
4984c6f
Replace freeipa auth backend by pam auth backend for userportal
cmd-ntrf Aug 18, 2023
34051b6
Add missing login service
cmd-ntrf Aug 18, 2023
af141a4
Define a tag for portal
cmd-ntrf Aug 18, 2023
5ca03d8
Update version and use portal tag
cmd-ntrf Aug 21, 2023
2b4b81b
Downgrade portal version following issue with pyopenssl
cmd-ntrf Aug 22, 2023
f7a7205
Bump slurm_job_exporter to 0.2.0
cmd-ntrf Aug 22, 2023
8d3786a
Fix slurm_job_exporter::version to 0.2.0
cmd-ntrf Aug 22, 2023
0576745
Transition from profile::userportal to trailblazing_turtle class
cmd-ntrf Apr 12, 2024
3b42c9c
Fix site.yaml
cmd-ntrf Apr 12, 2024
716ac38
Add missing trailblazing_turtle server params
cmd-ntrf Apr 12, 2024
1a55a10
Add stripped class userportal.pp
cmd-ntrf Apr 12, 2024
e4d1fb7
Fix trailblazing_turtle declaration
cmd-ntrf Apr 12, 2024
6e4de45
Fix logins
cmd-ntrf Apr 12, 2024
69f0f82
Add missing bracket
cmd-ntrf Apr 12, 2024
b0d77dc
Fix puppet-trailblazing_turtle version to v0.1.0
cmd-ntrf Apr 12, 2024
1aa41fb
Bump trailblazing-turtle to v1.4.0
cmd-ntrf Apr 12, 2024
3b3243b
Fix version in common.yaml
cmd-ntrf Apr 12, 2024
1368e81
Bump puppet trailblazing turtle to 0.2.1
cmd-ntrf Apr 12, 2024
a3f9c31
Bump puppet-trailblazing_turtle
cmd-ntrf Oct 10, 2024
2dfa15a
Add subdomain for trailblazing-turtle
cmd-ntrf Oct 10, 2024
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
4 changes: 4 additions & 0 deletions Puppetfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,7 @@ mod 'saz-limits', '3.0.4'
mod 'computecanada-jupyterhub',
:git => 'https://github.com/ComputeCanada/puppet-jupyterhub.git',
:ref => 'v5.0.6'

mod 'computecanada-trailblazing_turtle',
:git => 'https://github.com/ComputeCanada/puppet-trailblazing_turtle.git',
:ref => 'v0.3.0'
2 changes: 2 additions & 0 deletions bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ ENC_CMD="eyaml encrypt -o block --pkcs7-public-key=${PKCS7_KEY}"
$ENC_CMD -l 'profile::freeipa::mokey::password' -s $(openssl rand -base64 9)
$ENC_CMD -l 'profile::freeipa::server::ds_password' -s $(openssl rand -base64 9)
$ENC_CMD -l 'profile::freeipa::server::admin_password' -s $(openssl rand -base64 9)
$ENC_CMD -l 'trailblazing_turtle::server::password' -s $(openssl rand -base64 9)
$ENC_CMD -l 'trailblazing_turtle::server::root_api_token' -s $(openssl rand -hex 20)
) > /etc/puppetlabs/code/environments/production/data/bootstrap.yaml

# Apply bootstrap classes if any
Expand Down
17 changes: 16 additions & 1 deletion data/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ profile::slurm::controller::autoscale_version: '0.5.1'
profile::slurm::node::enable_tmpfs_mounts: true

profile::accounts::project_regex: '(ctb|def|rpp|rrg)-[a-z0-9_-]*'
profile::users::ldap::access_tags: ['login:sshd', 'node:sshd', 'proxy:jupyterhub-login']
profile::users::ldap::access_tags: ['login:sshd', 'node:sshd', 'proxy:jupyterhub-login', 'portal:login']
profile::users::ldap::users:
'user':
count: "%{alias('terraform.data.nb_users')}"
Expand Down Expand Up @@ -289,6 +289,7 @@ profile::reverse_proxy::subdomains:
ipa: "ipa.int.%{lookup('terraform.data.domain_name')}"
mokey: "%{lookup('terraform.tag_ip.mgmt.0')}:%{lookup('profile::freeipa::mokey::port')}"
jupyter: "https://127.0.0.1:8000"
explore: "http://%{lookup('terraform.tag_ip.portal.0')}:9000"

profile::jupyterhub::hub::register_url: "https://mokey.%{lookup('terraform.data.domain_name')}/auth/signup"
profile::jupyterhub::hub::reset_pw_url: "https://mokey.%{lookup('terraform.data.domain_name')}/auth/forgotpw"
Expand All @@ -303,3 +304,17 @@ profile::gpu::install::passthrough::packages:
- nvidia-xconfig
- nvidia-persistenced
- nvidia-driver-cuda

profile::metrics::slurm_job_exporter::version: 0.2.0

trailblazing_turtle::server::prometheus_ip: "%{alias('terraform.tag_ip.mgmt.0')}"
trailblazing_turtle::server::ldap_password: "%{alias('profile::freeipa::server::admin_password')}"
trailblazing_turtle::server::slurm_password: "%{alias('profile::slurm::accounting::password')}"
trailblazing_turtle::server::cluster_name: "%{alias('profile::slurm::base::cluster_name')}"
trailblazing_turtle::server::prometheus_port: 9090
trailblazing_turtle::server::db_ip: 127.0.0.1
trailblazing_turtle::server::db_port: 3306
trailblazing_turtle::version: 1.4.0

trailblazing_turtle::slurm_jobscripts::api_url: "http://%{lookup('terraform.tag_ip.portal.0')}:9000"
trailblazing_turtle::slurm_jobscripts::token: "%{alias('trailblazing_turtle::server::root_api_token')}"
3 changes: 3 additions & 0 deletions data/site.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ magic_castle::site::tags:
- profile::accounts
- profile::nfs
- profile::users::ldap
- trailblazing_turtle::slurm_jobscripts
node:
- profile::gpu
- profile::jupyterhub::node
Expand All @@ -54,6 +55,8 @@ magic_castle::site::tags:
nfs:
- profile::nfs::server
- profile::cvmfs::alien_cache
portal:
- profile::userportal
proxy:
- profile::jupyterhub::hub
- profile::reverse_proxy
Expand Down
2 changes: 1 addition & 1 deletion site/profile/manifests/freeipa.pp
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@
Integer $id_start,
String $admin_password,
String $ds_password,
Array[String] $hbac_services = ['sshd', 'jupyterhub-login'],
Array[String] $hbac_services = ['sshd', 'jupyterhub-login', 'login'],
) {
include profile::base::etc_hosts
include profile::freeipa::base
Expand Down
24 changes: 24 additions & 0 deletions site/profile/manifests/userportal.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
class profile::userportal {
$instances = lookup('terraform.instances')
$logins = keys($instances.filter |$keys, $values| { 'login' in $values['tags'] })

$domain_name = lookup('profile::freeipa::base::domain_name')
$int_domain_name = "int.${domain_name}"
$base_dn = join(split($int_domain_name, '[.]').map |$dc| { "dc=${dc}" }, ',')

class { 'trailblazing_turtle':
root_api_token => lookup('trailblazing_turtle::server::root_api_token'),
password => lookup('trailblazing_turtle::server::password'),
prometheus_ip => lookup('trailblazing_turtle::server::prometheus_ip'),
prometheus_port => lookup('trailblazing_turtle::server::prometheus_port'),
db_ip => lookup('trailblazing_turtle::server::db_ip'),
db_port => lookup('trailblazing_turtle::server::db_port'),
ldap_password => lookup('trailblazing_turtle::server::ldap_password'),
slurm_password => lookup('trailblazing_turtle::server::slurm_password'),
cluster_name => lookup('trailblazing_turtle::server::cluster_name'),
subdomain => lookup('trailblazing_turtle::subdomain'),
logins => $logins,
base_dn => $base_dn,
domain_name => $domain_name,
}
}
Loading