Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • ruben/communication-install-scripts
  • bf/communication-install-scripts
2 results
Show changes
Commits on Source (6)
...@@ -23,6 +23,8 @@ HOSTNAME=bbb.foo.bar ...@@ -23,6 +23,8 @@ HOSTNAME=bbb.foo.bar
# Basic setup # Basic setup
apt-get install --no-install-recommends language-pack-en certbot wget equivs apt-transport-https software-properties-common python3-certbot-nginx apache2-utils apt-get install --no-install-recommends language-pack-en certbot wget equivs apt-transport-https software-properties-common python3-certbot-nginx apache2-utils
update-locale LANG=en_US.UTF-8
# We don't want to install ttf-mscorefonts, they are not free # We don't want to install ttf-mscorefonts, they are not free
cat << EOF > bbb-fakedepends.control cat << EOF > bbb-fakedepends.control
Section: misc Section: misc
...@@ -67,7 +69,7 @@ sed 's|.*node main.js|PORT=3000 /usr/bin/node main.js|' -i /usr/share/meteor/bun ...@@ -67,7 +69,7 @@ sed 's|.*node main.js|PORT=3000 /usr/bin/node main.js|' -i /usr/share/meteor/bun
###### Configure SSL ###### Configure SSL
certbot --webroot -w /var/www/bigbluebutton-default/ -m sysadmin@$HOSTNAME certonly --agree-tos -d $HOSTNAME -n certbot --webroot -w /var/www/html/ -m sysadmin@$HOSTNAME certonly --agree-tos -d $HOSTNAME -n
cat << EOF |sed '/server_name.*$/ r /dev/stdin' -i /etc/nginx/sites-available/bigbluebutton cat << EOF |sed '/server_name.*$/ r /dev/stdin' -i /etc/nginx/sites-available/bigbluebutton
...@@ -97,7 +99,7 @@ sed 's/http/https/' -i /var/lib/tomcat7/webapps/demo/bbb_api_conf.jsp ...@@ -97,7 +99,7 @@ sed 's/http/https/' -i /var/lib/tomcat7/webapps/demo/bbb_api_conf.jsp
sed 's/JoinViaHTML5Client=false/JoinViaHTML5Client=true/' -i /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties sed 's/JoinViaHTML5Client=false/JoinViaHTML5Client=true/' -i /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties
# Fix integration issue with Canvas # Fix integration issue with Canvas
sed 's/5,6/5,20/' -i /opt/freeswitch/conf/dialplan/default/bbb_echo_test.xml /opt/freeswitch/conf/dialplan/default/bbb_conference.xml sed 's/\d{5,6}/\d{5,6}|\\d{20}/' -i /opt/freeswitch/conf/dialplan/default/bbb_echo_test.xml /opt/freeswitch/conf/dialplan/default/bbb_conference.xml
bbb-conf --setip $HOSTNAME bbb-conf --setip $HOSTNAME
service nginx restart service nginx restart
......
...@@ -18,6 +18,8 @@ ...@@ -18,6 +18,8 @@
# This script has been tested on Trisquel 9 # This script has been tested on Trisquel 9
# References https://github.com/instructure/canvas-lms/wiki/Production-Start
HOSTNAME=canvas.foo.bar HOSTNAME=canvas.foo.bar
# Install basic packages for this script # Install basic packages for this script
...@@ -40,43 +42,47 @@ sudo sh -c 'echo deb https://oss-binaries.phusionpassenger.com/apt/passenger bio ...@@ -40,43 +42,47 @@ sudo sh -c 'echo deb https://oss-binaries.phusionpassenger.com/apt/passenger bio
# Update lists and install dependencies # Update lists and install dependencies
apt-get update apt-get update
apt-get dist-upgrade
apt-get install nodejs ruby2.4 ruby2.4-dev zlib1g-dev libxml2-dev \ apt-get install nodejs ruby2.4 ruby2.4-dev zlib1g-dev libxml2-dev \
libsqlite3-dev postgresql libpq-dev \ libsqlite3-dev postgresql libpq-dev libxmlsec1-dev \
libxmlsec1-dev curl make g++ yarn=1.10.1-1 postgresql-10\ curl make g++ yarn=1.10.1-1 postgresql-10 passenger \
passenger libapache2-mod-passenger apache2 python3-certbot-apache libapache2-mod-passenger apache2 python3-certbot-apache \
language-pack-en redis-server
update-locale LANG=en_US.UTF-8
# Configure database # Configure database
cd /
DBPASS=$(pwgen 20 -n1) DBPASS=$(pwgen 20 -n1)
su postgres -c "psql -c \"CREATE USER canvas WITH PASSWORD '$DBPASS';\"" su postgres -l -c "psql -c \"CREATE USER canvas WITH PASSWORD '$DBPASS';\""
su postgres -c 'createdb canvas_development --owner=canvas' su postgres -l -c 'createdb canvas_development --owner=canvas'
su postgres -c 'createdb canvas_production --owner=canvas' su postgres -l -c 'createdb canvas_production --owner=canvas'
su postgres -c 'createdb canvas_test --owner=canvas' su postgres -l -c 'createdb canvas_test --owner=canvas'
# Install canvas from git # Install canvas from git
adduser canvas --system --home /srv/canvas --shell /bin/bash adduser canvas --system --home /srv/canvas --shell /bin/bash
cd /srv/canvas
su canvas -c 'git clone https://github.com/instructure/canvas-lms.git /srv/canvas' su canvas -l -c 'git clone https://github.com/instructure/canvas-lms.git /srv/canvas'
su canvas -c 'git -C /srv/canvas checkout stable' su canvas -l -c 'git -C /srv/canvas checkout stable'
for config in amazon_s3 dynamic_settings database \ for config in amazon_s3 dynamic_settings database logging\
delayed_jobs domain file_store outgoing_mail security external_migration; \ delayed_jobs domain file_store outgoing_mail security external_migration; \
do cp /srv/canvas/config/$config.yml.example /srv/canvas/config/$config.yml; done do cp /srv/canvas/config/$config.yml.example /srv/canvas/config/$config.yml; done
su canvas -c "sed 's/your_password/$DBPASS/' -i /srv/canvas/config/database.yml" su canvas -c "sed 's/your_password/$DBPASS/' -i /srv/canvas/config/database.yml"
su canvas -c "sed 's/12345/$(pwgen 50 -n1)/' -i /srv/canvas/config/security.yml" su canvas -c "sed 's/12345/$(pwgen 50 -n1)/' -i /srv/canvas/config/security.yml"
su canvas -c "sed 's/canvas.example.com/$HOSTNAME/' -i /srv/canvas/config/domain.yml"
su canvas -c "sed '/production:/a\ \ log_level: info' -i /srv/canvas/config/logging.yml"
gem install bundler -v 1.13.6 gem install bundler -v 1.13.6
su -l canvas -c 'bundle install --path vendor/bundle'
su -l canvas -c 'yarn install --pure-lockfile && yarn install --pure-lockfile'
npm install -g coffee-script@1.6.2 npm install -g coffee-script@1.6.2
su -l canvas -c 'bundle exec rails db:initial_setup'
su -l canvas -c 'bundle exec rails canvas:compile_assets' su canvas -l -c 'RAILS_ENV=production bundle install --path vendor/bundle'
su canvas -l -c 'yarn install --pure-lockfile && yarn install --pure-lockfile'
su canvas -l -c 'RAILS_ENV=production bundle exec rails canvas:compile_assets'
su canvas -l -c 'RAILS_ENV=production bundle exec rails db:initial_setup'
# You can run this for testing # You can run this for testing
# su -l canvas -c 'bundle exec rails server' # su -l canvas -c 'bundle exec rails server'
...@@ -106,6 +112,9 @@ production: ...@@ -106,6 +112,9 @@ production:
- redis://localhost - redis://localhost
EOF EOF
systemctl enable redis-server
systemctl start redis-server
cat << EOF > /etc/apache2/sites-enabled/canvas.conf cat << EOF > /etc/apache2/sites-enabled/canvas.conf
#PassengerLogLevel 5 #PassengerLogLevel 5
PassengerStartTimeout 300 PassengerStartTimeout 300
...@@ -136,7 +145,6 @@ cat << EOF > /etc/apache2/sites-enabled/canvas.conf ...@@ -136,7 +145,6 @@ cat << EOF > /etc/apache2/sites-enabled/canvas.conf
CustomLog /var/log/apache2/canvas_ssl_access.log combined CustomLog /var/log/apache2/canvas_ssl_access.log combined
SSLEngine on SSLEngine on
BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
# the following ssl certificate files are generated for you from the ssl-cert package.
SSLCertificateFile /etc/letsencrypt/live/$HOSTNAME/fullchain.pem SSLCertificateFile /etc/letsencrypt/live/$HOSTNAME/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/$HOSTNAME/privkey.pem SSLCertificateKeyFile /etc/letsencrypt/live/$HOSTNAME/privkey.pem
SetEnv RAILS_ENV production SetEnv RAILS_ENV production
...@@ -148,4 +156,12 @@ cat << EOF > /etc/apache2/sites-enabled/canvas.conf ...@@ -148,4 +156,12 @@ cat << EOF > /etc/apache2/sites-enabled/canvas.conf
</VirtualHost> </VirtualHost>
EOF EOF
# Configure your email output by editing /srv/canvas/config/outgoing_mail.yml
service apache2 restart service apache2 restart
# Enable background job processing
ln -s /srv/canvas/script/canvas_init /etc/init.d/canvas_init
update-rc.d canvas_init defaults
/etc/init.d/canvas_init start
...@@ -7,3 +7,4 @@ These are scripts to install communication tools on Trisquel: ...@@ -7,3 +7,4 @@ These are scripts to install communication tools on Trisquel:
* Improve license selector for uploaded content on Canvas, removing nonfree options and adding GPL and FDL * Improve license selector for uploaded content on Canvas, removing nonfree options and adding GPL and FDL
* Remove integration with non-free services/products * Remove integration with non-free services/products
* Add script for Redmine