Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
Greenlight
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
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Arbeitsgruppe Hardwarenahe IT-Systeme
Greenlight
Commits
990f72eb
Unverified
Commit
990f72eb
authored
May 23, 2019
by
farhatahmad
Committed by
GitHub
May 23, 2019
Browse files
Options
Downloads
Patches
Plain Diff
Fixed issues with endpoint and conf check (#553)
parent
9467f756
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
config/application.rb
+2
-2
2 additions, 2 deletions
config/application.rb
lib/tasks/configuration.rake
+13
-2
13 additions, 2 deletions
lib/tasks/configuration.rake
with
15 additions
and
4 deletions
config/application.rb
+
2
−
2
View file @
990f72eb
...
...
@@ -52,8 +52,8 @@ module Greenlight
config
.
bigbluebutton_secret_default
=
"8cd8ef52e8e101574e400365b55e11a6"
# Use standalone BigBlueButton server.
config
.
bigbluebutton_endpoint
=
ENV
[
"BIGBLUEBUTTON_ENDPOINT"
]
||
config
.
bigbluebutton_endpoint_default
config
.
bigbluebutton_secret
=
ENV
[
"BIGBLUEBUTTON_SECRET"
]
||
config
.
bigbluebutton_secret_default
config
.
bigbluebutton_endpoint
=
ENV
[
"BIGBLUEBUTTON_ENDPOINT"
]
.
present?
?
ENV
[
"BIGBLUEBUTTON_ENDPOINT"
]
:
config
.
bigbluebutton_endpoint_default
config
.
bigbluebutton_secret
=
ENV
[
"BIGBLUEBUTTON_SECRET"
]
.
present?
?
ENV
[
"BIGBLUEBUTTON_SECRET"
]
:
config
.
bigbluebutton_secret_default
# Fix endpoint format if required.
config
.
bigbluebutton_endpoint
+=
"/"
unless
config
.
bigbluebutton_endpoint
.
ends_with?
(
'/'
)
...
...
This diff is collapsed.
Click to expand it.
lib/tasks/configuration.rake
+
13
−
2
View file @
990f72eb
...
...
@@ -16,15 +16,17 @@ namespace :conf do
end
passed
endpoint
=
fix_endpoint_format
(
ENV
[
'BIGBLUEBUTTON_ENDPOINT'
])
# Tries to establish a connection to the BBB server from Greenlight
print
"Checking Connection"
test_request
(
ENV
[
'BIGBLUEBUTTON_ENDPOINT'
]
)
test_request
(
endpoint
)
passed
# Tests the checksum on the getMeetings api call
print
"Checking Secret"
checksum
=
Digest
::
SHA1
.
hexdigest
(
"getMeetings
#{
ENV
[
'BIGBLUEBUTTON_SECRET'
]
}
"
)
test_request
(
"
#{
ENV
[
'BIGBLUEBUTTON_ENDPOINT'
]
}
getMeetings?checksum=
#{
checksum
}
"
)
test_request
(
"
#{
endpoint
}
getMeetings?checksum=
#{
checksum
}
"
)
passed
if
ENV
[
'ALLOW_MAIL_NOTIFICATIONS'
]
==
'true'
...
...
@@ -61,6 +63,15 @@ rescue => e
failed
(
"Error connecting to BigBlueButton server -
#{
e
}
"
)
end
def
fix_endpoint_format
(
url
)
# Fix endpoint format if required.
url
+=
"/"
unless
url
.
ends_with?
(
'/'
)
url
+=
"api/"
if
url
.
ends_with?
(
'bigbluebutton/'
)
url
+=
"bigbluebutton/api/"
unless
url
.
ends_with?
(
'bigbluebutton/api/'
)
url
end
def
failed
(
msg
)
print
(
": Failed
\n
#{
msg
}
\n
"
)
exit
...
...
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