bigbluebutton / greenlight

A really simple end-user interface for your BigBlueButton server.
GNU Lesser General Public License v3.0
794 stars 3.8k forks source link

Installation without Docker? #1112

Closed Retep1972 closed 4 years ago

Retep1972 commented 4 years ago

I have a spare VPS which I wnat to setup for some schools to help them in these troubled times. Installation instructions for bbb are excelent! But my VPS Linux 16.04 does not support Docker, I would have to switch to Linux 18.04 but then bbb cannot be installed.

Is there any way to install Greenlight 2.0 without Docker? Al the google searches and answers end up at dead ends..

lalyos commented 4 years ago

Hi @Retep1972 I had the same intention (Helping Schools), what you can do: Open a new account at AWS, and you get a 100$ credit.

Works like a charm.

WIP: automated setup witch cloudformation: https://github.com/lalyos/bbb

farhatahmad commented 4 years ago

Hi @Retep1972

Yes it is possible. You'll need to start with installing Ruby and Rails on the machine. Here's the guide: https://gorails.com/setup/ubuntu/18.04

Let me know once you've got that done and I'll give you the next steps

Retep1972 commented 4 years ago

Hi @farhatahmad

thnx! I will get on it and get back to you!

Retep1972 commented 4 years ago

Hi @farhatahmad

I've got Ruby on rails installed on my machine. Whats next?

farhatahmad commented 4 years ago

Alright, so the next steps I'm giving to you are based off my memory, I'm quite busy at the moment so I'm not able to test it out. Let me know if you run into any errors 1- Clone the github repo onto your machine 2- cd ~/greenlight 3- cp sample.env .env 4- gem install bundler 5- bundle install 6- cat ./greenlight.nginx | sudo tee /etc/bigbluebutton/nginx/greenlight.nginx 7- rails s -p 5000

Let me know what errors you hit and what happens. These aren't the complete steps, but the next on what errors you get

Retep1972 commented 4 years ago

@farhatahmad , It looks like it went ok. process ends with "Listening on tcp://localhost:5000" Do I need to open a webbrowser on the server via another ssh session and connect to the listening adres?

farhatahmad commented 4 years ago

@Retep1972 Before you do that, you'll also need to run bundle exec rake db:setup

Then yes opening a browser and trying to access Greenlight would be a good test

Retep1972 commented 4 years ago

@farhatahmad Yes it worked! Thank you! I can acces Greenlight with a "links" browser on my VPS. The UI is not realy suited for configuration or is there a way to set greenlight to be reached with a desktop brouwser outside my VPS?

farhatahmad commented 4 years ago

Can you try accessing Greenlight from your desktop browser at "http(s)://BigBlueButton_Server_Hostname/b"?

Retep1972 commented 4 years ago

Lookes good at first but the landing page gives a 404 and cant sign in. Also gives a 404 not found message. But yet another step further.

Retep1972 commented 4 years ago

@farhatahmad Thanks for your help so far! I think I can manage from here. Just a few final questions: When I try to acces Greenlight from from my desktop browser it gives just a part of the website and a 404 "Not found" and I can't log in, clicking on Log in als gives a 404. When I acces greenlight on the server with links it functions ok. Any suggestion what happens here?

As said it works on the server however it does not show an Administrator option in the top menu. I used the folowing to create the user with admin rights: bundle exec rake user:create["peter","email","Password","admin"] Is that because of the links browser or is here an error in de user:create syntax?

farhatahmad commented 4 years ago

Is it the Greenlight 404 page your seeing? or is it the nginx error page?

If its the Greenlight, can you send me some logs from ~/greenlight/log/production.log

Retep1972 commented 4 years ago

@farhatahmad Yes it is the greenlight page. I only see a development.log? I'm not Rails native so I don't exactly now how it should be configered or what the production environment should look like.

I think I skipped a step. The configuring of Greenlight. The documentation is all based on Docker based installation but I will see what works.

seteq commented 4 years ago

I'm stuck exactly at the same spot. When I access https://myserver/b the rails console outputs following error:

Started GET "/b" for 62.178.156.207 at 2020-04-02 21:54:49 +0200
Cannot render console from 62.178.156.207! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255

Any ideas?

farhatahmad commented 4 years ago

@seteq Try adding -b 0.0.0.0 to the end of your rails s line

seteq commented 4 years ago

I can now see that rails is binding to all interfaces instead of localhost, but the error is still the same. Is there some other kind of ip whitelisting needed?

=> Booting Puma
=> Rails 5.2.3 application starting in development
=> Run `rails server -h` for more startup options
Puma starting in single mode...
* Version 3.12.4 (ruby 2.5.1-p57), codename: Llamas in Pajamas
* Min threads: 5, max threads: 5
* Environment: development
* Listening on tcp://0.0.0.0:5000
Use Ctrl-C to stop
Started GET "/b" for 62.178.156.217 at 2020-04-02 22:07:34 +0200
Cannot render console from 62.178.156.217! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255
Retep1972 commented 4 years ago

Tried all the options keep giving the 404 "Page not found" . Could there be a combination with a connection fault? When I do bundle exec rake conf:check I get: Checking environment: Passed Checking Connection: Failed Could not get a valid response from BigBlueButton server -

404 Not Found

404 Not Found


nginx/1.10.3 (Ubuntu)

In the .env file the endpoint is set exactly as outputted by bbb-conf--secret..

farhatahmad commented 4 years ago

Could be. Did you confirm that your BigBlueButton is up and running?

Retep1972 commented 4 years ago

@farhatahmad
Yes everything up and running. I only have one warning. but status of service is ok.

Potential problems described below

IP does not match:

IP from ifconfig: xx.xxx.xxx.xxx

/etc/nginx/sites-available/bigbluebutton: mysite.com

root@h2833988:/opt/tomcat# bbb-conf --status nginx —————————————————► [✔ - active] freeswitch ————————————► [✔ - active] redis-server ——————————► [✔ - active] bbb-apps-akka —————————► [✔ - active] bbb-transcode-akka ————► [✔ - active] bbb-fsesl-akka ————————► [✔ - active] red5 ——————————————————► [✔ - active] tomcat7 ———————————————► [✔ - active] mongod ————————————————► [✔ - active] bbb-html5 —————————————► [✔ - active] bbb-webrtc-sfu ————————► [✔ - active] kurento-media-server ——► [✔ - active] etherpad ——————————————► [✔ - active] bbb-web ———————————————► [✔ - active]

sarzali07 commented 4 years ago

@farhatahmad Thanks for your instruction of installing greenlight without docker but I am new here. I already installed greenlight via docker image but I can not modify greenlight landing pages nor able to find templates files. I am sending two screenshots and let me know how to download and replace greenlight template. Please docker running greenlight

sarzali07 commented 4 years ago

@farhatahmad with following steps I manage to download greenlight template but when I modify it can not modification. 1- Clone the github repo onto your machine 2- cd ~/greenlight 3- cp sample.env .env 4- gem install bundler 5- bundle install 6- cat ./greenlight.nginx | sudo tee /etc/bigbluebutton/nginx/greenlight.nginx

after I do

1: docker-compose down 2: cd .. 3: mv greenlight/ greenlight-old/ 4: cp ~/greenlight-old/.env ~/greenlight/.env 5: sudo cp -r ~/greenlight-old/db ~/greenlight/ 6: cd ~/greenlight 7: docker-compose down 8: docker-compose up -d

But When I now modify template it does not impact please help me sort out greenlight-get gitstatus

Regards

Retep1972 commented 4 years ago

@seteq

When I connect to 127.0.0.1:5000 with a browser (such as links)directly on my server (VPS) I get the correct page and functionality. How is that on your server? I think it is a referal issue, it seems that mywebsite.com/b does not refer correctly to localhost:5000

Retep1972 commented 4 years ago

@farhatahmad

This is what greenlight gives back as a connection is made with a desktop browser: Started GET "/b" for 178.84.43.145 at 2020-04-04 18:25:06 +0200 Cannot render console from xxx.xxx.xxx.xx! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255

This what greenlight gives back when a connection is made directly on the server: Started GET "/" for 127.0.0.1 at 2020-04-04 18:27:38 +0200 Processing by MainController#index as /

What forwards the connection from the outside IP adres to the localhost?

runout-at commented 4 years ago

does anybody have a functional receipt by now?

i think many issues are only because of the docker container. it would be much easier if we could do an install without docker and just do modifications for the layout,... without the hassle of docker.

buchacho commented 4 years ago

This is what greenlight gives back as a connection is made with a desktop browser: Started GET "/b" for 178.84.43.145 at 2020-04-04 18:25:06 +0200 Cannot render console from xxx.xxx.xxx.xx! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255

This what greenlight gives back when a connection is made directly on the server: Started GET "/" for 127.0.0.1 at 2020-04-04 18:27:38 +0200 Processing by MainController#index as /

What forwards the connection from the outside IP adres to the localhost?

I assume that you also need to create a proxy server to redirect traffic to port 5000. You also need to check whether you have Docker containers running, in short, whether a new container with the database is being started.

Retep1972 commented 4 years ago

@buchacho

I installed greenlight without Docker. So I have no Docker containers running.

The redirection to the 5000 port is handled by: cat ./greenlight.nginx | tee /etc/bigbluebutton/nginx/greenlight.nginx

Routes requests to Greenlight based on the '/b' prefix.

Use this file to route '/b' paths on your BigBlueButton server

to the Greenlight application. If you are using a different

subpath, you should change it here.

location /b { proxy_pass http://127.0.0.1:5000; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_http_version 1.1; }

location /b/cable { proxy_pass http://127.0.0.1:5000; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; proxy_http_version 1.1;

So this looks like the forwarding is taken care of. Or do you suggest another option?

buchacho commented 4 years ago

No, there are no options. I myself do not really understand the whole structure of the project, and I do not know all the tools. Therefore, I'm sorry I could not help.

farhatahmad commented 4 years ago

@Retep1972

Try setting URL_HOST to your domain name in your .env file and restarting

Retep1972 commented 4 years ago

@farhatahmad Set URL_HOST to my domain name.. Same result.

farhatahmad commented 4 years ago

@Retep1972 Is it still the same error? If so can you send the error again after you've updated your url_host

Retep1972 commented 4 years ago

@farhatahmad The same as before: Started GET "/b" for 178.84.43.145 at 2020-04-06 19:52:30 +0200 Cannot render console from XXX.XXX.XXX.XX! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255

Some other angle maybe.. What is de desired output of "bundle exec rake conf:check" Checking environment: Passed Checking Connection: Passed Checking Secret: Passed In the documentation I read that if it is a HTTPS adres then there should be 4 tests?

Or could it be a whitelist issue?

buchacho commented 4 years ago

In the documentation I read that if it is a HTTPS adres then there should be 4 tests?

no, IF YOU USE smtp . what does the browser display? Set

location = / {
 return 307 /b;
} 

to your/etc/nginx/site_available / bluebutton server section.

buchacho commented 4 years ago

and why doesn't the server support docker? it sounds strange

speak rus?

Retep1972 commented 4 years ago

@buchacho My VPS provider does not allow the installation of Docker on Ubuntu 16.04. It does when I choose 18.04 but that won't go with BBB.

farhatahmad commented 4 years ago

@Retep1972 Can you add this line config.hosts = YOUR_DOMAIN_NAME at Line 85 (https://github.com/bigbluebutton/greenlight/blob/master/config/application.rb#L85) and restart Greenlight?

Retep1972 commented 4 years ago

@farhatahmad Did it. No change. Same output:

Started GET "/b" for XXX.XXX.XX.XXX at 2020-04-07 15:52:19 +0200 Cannot render console from XXX.XXX.XX.XXX! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255 (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC ↳ /usr/local/rvm/gems/ruby-2.5.1/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:98 Processing by RoomsController#show as HTML Parameters: {"room_uid"=>"b"} Setting Load (0.2ms) SELECT "settings". FROM "settings" WHERE "settings"."provider" = ? LIMIT ? [["provider", "greenlight"], ["LIMIT", 1]] ↳ app/controllers/application_controller.rb:67 Feature Load (0.2ms) SELECT "features". FROM "features" WHERE "features"."setting_id" = ? [["setting_id", 1]] ↳ app/controllers/application_controller.rb:67 User Load (0.3ms) SELECT "users". FROM "users" WHERE "users"."deleted" = ? AND "users"."id" IS NULL LIMIT ? [["deleted", 0], ["LIMIT", 1]] ↳ app/controllers/application_controller.rb:29 CACHE User Load (0.0ms) SELECT "users". FROM "users" WHERE "users"."deleted" = ? AND "users"."id" IS NULL LIMIT ? [["deleted", 0], ["LIMIT", 1]] ↳ app/controllers/application_controller.rb:29 CACHE User Load (0.0ms) SELECT "users". FROM "users" WHERE "users"."deleted" = ? AND "users"."id" IS NULL LIMIT ? [["deleted", 0], ["LIMIT", 1]] ↳ app/controllers/application_controller.rb:29 CACHE User Load (0.0ms) SELECT "users". FROM "users" WHERE "users"."deleted" = ? AND "users"."id" IS NULL LIMIT ? [["deleted", 0], ["LIMIT", 1]] ↳ app/controllers/application_controller.rb:29 Room Load (0.2ms) SELECT "rooms".* FROM "rooms" WHERE "rooms"."deleted" = ? AND "rooms"."uid" = ? LIMIT ? [["deleted", 0], ["uid", "b"], ["LIMIT", 1]] ↳ app/controllers/rooms_controller.rb:296 Completed 404 Not Found in 206ms (ActiveRecord: 3.3ms)

farhatahmad commented 4 years ago

Maybe set it to 178.84.43.145? I'm not sure why that isn't working. That's what it is complaining about..

seteq commented 4 years ago

What a mess here ;-) I just found the solution.

When you start greenlight with rails s -p 5000 it's running in development environment.

You need to add following line to your config/environments/development.rb just before end: config.relative_url_root = ENV['RELATIVE_URL_ROOT'] || "/b" if ENV['RELATIVE_URL_ROOT'] != "/"

If you are unsure, just take a look in the production.rb file in the same folder.

That explains the 404 error. nginx is forwarding the /b request but greenlight is not expecting to run with a relative url root by default and sends a 404 page.

Can anybody assist in setting this thing up with production environment?

Retep1972 commented 4 years ago

@seteq

That's it! Thank you, thank you!

farhatahmad commented 4 years ago

To run it in production use rails s -p 5000 -e production (You might also need the -b 0.0.0.0)

Retep1972 commented 4 years ago

@seteq

Did you get it running in production environment?

seteq commented 4 years ago

not yet. these docker-based applications nowadays are a complete nightmare to setup and run properly without docker.

# rails s -p 5000 -e production
=> Booting Puma
=> Rails 5.2.3 application starting in production
=> Run `rails server -h` for more startup options
Puma starting in single mode...
* Version 3.12.4 (ruby 2.5.1-p57), codename: Llamas in Pajamas
* Min threads: 5, max threads: 5
* Environment: production
* Listening on tcp://0.0.0.0:5000
Use Ctrl-C to stop
Error during failsafe response: The asset "application.css" is not present in the asset pipeline.
farhatahmad commented 4 years ago

Did you run RAILS_ENV=production rake assets:precompile?

Retep1972 commented 4 years ago

@seteq I got it to production without errors eventualy with these steps:

  1. add secret to : ~/config/credentials.yml.enc secret_key_base: "YOUR SECRET"
  2. ~/greenlight # RAILS_ENV=production rake db:setup
  3. ~/greenlight # RAILS_ENV=production rake db:migrate
  4. ~/greenlight # RAILS_ENV=production rake assets:precompile
  5. ~/greenlight # rails s -p 5000 -e production -b 0.0.0.0

I would have guest that the user database was migrated. But I could nog login with my credentials from the development environment. furthermore the register button was missing and I still had to put the /b behind my domain name. I will keep trying to get it to production but my time is running out..

farhatahmad commented 4 years ago

@Retep1972 The database doesn't get migrated between environments so that's expected.

the register button was missing

Is ALLOW_GREENLIGHT_ACCOUNTS=true in your .env file?

I still had to put the /b behind my domain name

Are you installing it on the same machine as a BigBlueButton server?

seteq commented 4 years ago

@farhatahmad thank you for the hint with the asset precompilation - now the page is loading without errors. but somehow it doesn't seem to use the settings in the .env file because it keeps complaining that a bbb test server is being used instead of the one set in the .env file.

The documentation suggests restarting the docker container to apply changes in the .env file. How can I apply them for production environment?

Retep1972 commented 4 years ago

@farhatahmad

I still had to put the /b behind my domain name Are you installing it on the same machine as a BigBlueButton server? Yes.

farhatahmad commented 4 years ago

@seteq

I'm assuming you made the changes after you started the Rails server? I think you can do a rails restart and it should pick up your changes

@Retep1972

Yeah if it's installed on a BigBlueButton server it has to be deployed with a different path to avoid conflicts. You can automatically redirect domain.com to domain.com/b using the instructions below

Optionally, if you wish to have the default landing page at the root of your BigBlueButton server redirect to Greenlight, add the following entry to the bottom of /etc/nginx/sites-available/bigbluebutton just before the last } character.

location = / {
  return 307 /b;
}

To have this change take effect, you must once again restart Nginx. sudo systemctl restart nginx

NaLiJa commented 4 years ago

Hi, I know the thread is closed, but since it was a great help to me with setting the system up without docker (we could really use a guide for this. I have a vserver which doesn't support docker, so this was a huge mess)

I faced the same problem like the posters above (test system message, no register button,...) On my server the problem actually was that the .env wasn't loaded at all, so first I followed the steps here https://docs.bigbluebutton.org/greenlight/gl-install.html#3-configure-greenlight to setup the secrets and the endpoint. Then I installed https://github.com/rbenv/rbenv-vars and copied .env to .rbenv-vars, added RAILS_ENV=production to the file and restarted Rails. Now it seems to work properly. Please note, I am totally new to Ruby/Rails, so there might be better ways or fixes to accomplish this, but with the hints above and the env change, it seems to work. Thanks for all the above posts!

Retep1972 commented 4 years ago

@NaLiJa I spend many hours on this and I think bbb could be a great functionality but I could not get it to work like I wanted. Inspite all the great help I got here. So I switched to jitsi. In about 30 minutes I had it up and running and could set up a videochat. It lacks some functionality and you cannot tweak it to your own needs as regards to the website and all but it is sufficient for me at the time being.