Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
I
inhysningspuppet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lysator
Puppet
inhysningspuppet
Commits
7b5826f1
Commit
7b5826f1
authored
5 years ago
by
Hugo Hörnquist
Browse files
Options
Downloads
Patches
Plain Diff
Openproject stuff.
parent
4c9e2bfd
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
manifests/site.pp
+5
-0
5 additions, 0 deletions
manifests/site.pp
modules/insidan/manifests/certificates.pp
+9
-5
9 additions, 5 deletions
modules/insidan/manifests/certificates.pp
modules/insidan/manifests/openproject.pp
+29
-17
29 additions, 17 deletions
modules/insidan/manifests/openproject.pp
with
43 additions
and
22 deletions
manifests/site.pp
+
5
−
0
View file @
7b5826f1
...
@@ -16,4 +16,9 @@ node 'liufs-test' {
...
@@ -16,4 +16,9 @@ node 'liufs-test' {
# include ::ssh
# include ::ssh
include
::wordpress
include
::wordpress
# include ::lysbackup
# include ::lysbackup
insidan::openproject
{
'ourthingy'
:
logo
=>
'liufs.png'
,
url
=>
'liufs-test.lysator.liu.se'
,
}
}
}
This diff is collapsed.
Click to expand it.
modules/insidan/manifests/certificates.pp
+
9
−
5
View file @
7b5826f1
class
insidan::certificates
{
define
insidan::certificates
(
$email
=
'hx@hx.ax'
,
# Putting in my personal email for now
$url
=
'insidan.holgerspexet.se'
,
)
{
class
{
'::letsencrypt'
:
class
{
'::letsencrypt'
:
email
=>
'hx@hx.ax'
,
# Putting in my personal email for now
email
=>
$email
,
}
}
letsencrypt::certonly
{
'insidan.holgerspexet.se'
:
letsencrypt::certonly
{
$url
:
domains
=>
[
'insidan.holgerspexet.se'
,
domains
=>
[
$url
,
'holgerspexet.lysator.liu.se'
,
# TODO multiple domains
# 'holgerspexet.lysator.liu.se',
],
],
manage_cron
=>
true
,
manage_cron
=>
true
,
suppress_cron_output
=>
true
,
suppress_cron_output
=>
true
,
...
...
This diff is collapsed.
Click to expand it.
modules/insidan/manifests/openproject.pp
+
29
−
17
View file @
7b5826f1
class
insidan::openproject
{
define
insidan::openproject
(
$logo
=
"holgerlogo.png"
,
$url
=
"insidan.holgerspexet.se"
,
)
{
# class insidan::openproject {
include
nginx
include
nginx
include
insidan::certificates
# insidan::certificates { 'openprojectcert': # url => $url,
# email => 'hugo.hornquist@liuformulastudent.se', # TODO NOOOOOOO
# }
# This is horrible. Please fix.
# This is horrible. Please fix.
exec
{
'install openproject repos'
:
exec
{
'install openproject repos'
:
command
=>
'bash -e wget -qO- https://dl.packager.io/srv/opf/openproject-ce/key | apt-key add -; sudo wget -O /etc/apt/sources.list.d/openproject-ce.list
command
=>
'bash -e wget -qO- https://dl.packager.io/srv/opf/openproject/key | apt-key add -; sudo wget -O /etc/apt/sources.list.d/openproject.list https://dl.packager.io/srv/opf/openproject/stable/10/installer/ubuntu/18.04.repo'
,
https://dl.packager.io/srv/opf/openproject-ce/stable/10/installer/ubuntu/18.04.repo'
,
creates
=>
'/etc/apt/sources.list.d/openproject.list'
,
creates
=>
'/etc/apt/sources.list.d/openproject-ce.list'
,
path
=>
[
'/usr/bin'
,
'/usr/sbin'
,
'/bin'
],
path
=>
[
'/usr/bin'
,
'/usr/sbin'
,
'/bin'
],
}~>
}~>
exec
{
'apt update'
:
command
=>
'apt update'
,
path
=>
[
'/usr/bin'
,
'/usr/sbin'
,
'/bin'
],
}
package
{
'openproject'
:
package
{
'openproject'
:
ensure
=>
installed
,
ensure
=>
installed
,
# Here, someone MUST run `openproject configure`. At least until we
# Here, someone MUST run `openproject configure`. At least until we
...
@@ -42,16 +52,18 @@ class insidan::openproject {
...
@@ -42,16 +52,18 @@ class insidan::openproject {
# Setup Nginx
# Setup Nginx
nginx::resource::server
{
'insidan.holgerspexet.se'
:
nginx::resource::server
{
$url
:
require
=>
[
Class
[
'::insidan::certificates'
],
],
listen_port
=>
8080
,
server_name
=>
[
'insidan.holgerspexet.se'
],
# TODO!!!!
# require => [ Class['::insidan::certificates'], ],
server_name
=>
[
$url
],
proxy
=>
'http://localhost:6000'
,
proxy
=>
'http://localhost:6000'
,
# Encrypt everything
# Encrypt everything
ssl_redirect
=>
true
,
#
ssl_redirect => true,
ssl
=>
true
,
#
ssl => true,
ssl_cert
=>
'
/etc/letsencrypt/live/
insidan.holgerspexet.se
/fullchain.pem
'
,
#
ssl_cert =>
"
/etc/letsencrypt/live/
${url}
/fullchain.pem
"
,
ssl_key
=>
'
/etc/letsencrypt/live/
insidan.holgerspexet.se
/privkey.pem
'
,
#
ssl_key
=>
"
/etc/letsencrypt/live/
${url}
/privkey.pem
"
,
# Forward secret stuff
# Forward secret stuff
proxy_set_header
=>
[
"X-Forwarded-Proto
\$
scheme"
,
proxy_set_header
=>
[
"X-Forwarded-Proto
\$
scheme"
,
...
@@ -64,14 +76,14 @@ class insidan::openproject {
...
@@ -64,14 +76,14 @@ class insidan::openproject {
ssl_prefer_server_ciphers
=>
'on'
,
ssl_prefer_server_ciphers
=>
'on'
,
}
}
file
{
'/opt/openproject/public/assets/logo_openproject_white_big-2c6d79fa03613154cf6bd67c622dbae5b93ed3199e0e7332d96b6f8ec21f85a1.png'
:
#
file { '/opt/openproject/public/assets/logo_openproject_white_big-2c6d79fa03613154cf6bd67c622dbae5b93ed3199e0e7332d96b6f8ec21f85a1.png':
ensure
=>
file
,
#
ensure => file,
source
=>
'
puppet:///modules/insidan/
holgerlogga.png'
#
source =>
"
puppet:///modules/insidan/
${logo}"
}
#
}
file
{
'/srv/test.png'
:
file
{
'/srv/test.png'
:
ensure
=>
file
,
ensure
=>
file
,
source
=>
'
puppet:///modules/insidan/
holgerlogga.png'
source
=>
"
puppet:///modules/insidan/
${logo}
"
}
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment