Advertisement
evanil

arvadosInstallation

Nov 18th, 2016
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.64 KB | None | 0 0
  1. Basic Steps
  2. -------------
  3.  
  4. sudo /usr/bin/apt-key adv --keyserver pool.sks-keyservers.net --recv 1078ECD7
  5. echo "deb http://apt.arvados.org/ trusty main" | sudo tee /etc/apt/sources.list.d/arvados.list
  6.  
  7. Unique Identifier
  8. ------------------
  9.  
  10. tr -dc 0-9a-z </dev/urandom | head -c5; echo
  11. 1j91c
  12.  
  13. Postgres
  14. ---------
  15.  
  16. sudo apt-get install postgresql
  17. sudo -u postgres bash
  18. createuser --encrypted -R -S --pwprompt arvados_sso
  19. createdb arvados_sso_production -T template0 -E UTF8 -O arvados_sso
  20. createuser --encrypted -R -S --pwprompt arvados
  21. createdb arvados_production -T template0 -E UTF8 -O arvados
  22.  
  23. ------------
  24. SSO
  25.  
  26. sudo apt-get install \
  27. gawk g++ gcc make libc6-dev libreadline6-dev zlib1g-dev libssl-dev \
  28. libyaml-dev libsqlite3-dev sqlite3 autoconf libgdbm-dev \
  29. libncurses5-dev automake libtool bison pkg-config libffi-dev curl
  30.  
  31. Ruby
  32. ----
  33.  
  34.  
  35. mkdir -p ~/src
  36. cd ~/src
  37. curl http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.7.tar.gz | tar xz
  38. cd ruby-2.1.7
  39. ./configure --disable-install-rdoc
  40. make
  41. sudo make install
  42.  
  43. sudo -i gem install bundler
  44.  
  45.  
  46. sudo -u www-data RAILS_ENV=production bundle exec rails console
  47.  
  48. NGINX
  49. ----------------------
  50.  
  51. # Install our PGP key and add HTTPS support for APT
  52. sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 561F9B9CAC40B2F7
  53. sudo apt-get install -y apt-transport-https ca-certificates
  54.  
  55. # Add our APT repository
  56. sudo sh -c 'echo deb https://oss-binaries.phusionpassenger.com/apt/passenger trusty main > /etc/apt/sources.list.d/passenger.list'
  57. sudo apt-get update
  58.  
  59. # Install Passenger + Nginx
  60. sudo apt-get install -y nginx-extras passenger
  61.  
  62. vi /etc/nginx/nginx.conf
  63. include /etc/nginx/passenger.conf;
  64. sudo service nginx restart
  65. sudo /usr/bin/passenger-config validate-install
  66.  
  67. SSO installation
  68. -----------------
  69.  
  70. sudo apt-get install arvados-sso-server
  71.  
  72. /etc/arvados/sso/application.yml
  73. /etc/arvados/sso/database.yml
  74. /etc/arvados/sso/production.rb
  75.  
  76. SSO secret: 39o9v4sesuvp4h3etznk34vbrmmp2cyp10hff197omyfobj55tz3eyje1wo0i7gbtqtnqfemdptq49
  77.  
  78. Azure_sso_app_secret: "1aep6wdjiytqfkb9rm0784d8zizkvvfijdfdrz5bheup3agma6y1uqna470cg5q6z2w6mz2elv55r8"
  79.  
  80. sudo dpkg-reconfigure arvados-sso-server
  81.  
  82. cd /var/www/arvados-sso/current
  83. sudo -u www-data RAILS_ENV=production bundle exec rails console
  84.  
  85. sso_app_secret: "3gve0puxzpu0u6rinmctlspo3p07a9tw7idtnax8gqwie2jx69h9cul22jj1fb6bf5zhgpa7zv1png"
  86.  
  87.  
  88. SSO
  89.  
  90. server {
  91. listen 23.102.16.73:8900;
  92. server_name localhost-sso;
  93.  
  94. root /var/www/arvados-sso/current/public;
  95. index index.html;
  96.  
  97. passenger_enabled on;
  98. # If you're not using RVM, comment out the line below.
  99. passenger_ruby /usr/local/bin/ruby;
  100. }
  101.  
  102. upstream sso {
  103. server 23.102.16.73:8900 fail_timeout=10s;
  104. }
  105.  
  106. proxy_http_version 1.1;
  107.  
  108. server {
  109. listen 23.102.16.73:443 ssl;
  110. server_name arvados-sso;
  111.  
  112. ssl on;
  113. ssl_certificate /root/ssl/servet.crt;
  114. ssl_certificate_key /root/ssl/server.key;
  115.  
  116. index index.html;
  117.  
  118. location / {
  119. proxy_pass http://sso;
  120. proxy_redirect off;
  121. proxy_connect_timeout 90s;
  122. proxy_read_timeout 300s;
  123.  
  124. proxy_set_header X-Forwarded-Proto https;
  125. proxy_set_header Host $http_host;
  126. proxy_set_header X-Real-IP $remote_addr;
  127. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  128. }
  129. }
  130.  
  131. /etc/sysctl.conf
  132. http://stackoverflow.com/questions/3191509/nginx-error-99-cannot-assign-requested-address
  133.  
  134. API
  135. -------------------------------
  136.  
  137. sudo apt-get install bison build-essential libcurl4-openssl-dev git arvados-api-server
  138.  
  139. server {
  140. listen 10.2.213.67:8000;
  141. server_name localhost-api;
  142.  
  143. root /var/www/arvados-api/current/public;
  144. index index.html index.htm index.php;
  145.  
  146. passenger_enabled on;
  147. # If you're using RVM, uncomment the line below.
  148. #passenger_ruby /usr/local/rvm/wrappers/default/ruby;
  149.  
  150. # This value effectively limits the size of API objects users can
  151. # create, especially collections. If you change this, you should
  152. # also ensure the following settings match it:
  153. # * `client_max_body_size` in the server section below
  154. # * `client_max_body_size` in the Workbench Nginx configuration (twice)
  155. # * `max_request_size` in the API server's application.yml file
  156. client_max_body_size 128m;
  157. }
  158.  
  159. upstream api {
  160. server 10.2.213.67:8000 fail_timeout=10s;
  161. }
  162.  
  163. upstream websockets {
  164. # The address below must match the one specified in puma's -b option.
  165. server 10.2.213.67:8100 fail_timeout=10s;
  166. }
  167.  
  168. secret_token: 1lofnocuylfam8qmqko730l25enxg3ithd1wtdvivxh5i852pxtm3gel3qysanqn6p1gyi7pkhcbce
  169. blob_signing_key: 3lwm5nwzwg9f2gn4zq4xnkncq1e8j6ulkcxe9j0esk5l7d19u9qhxarza01qaq3bugfjnn6ipe8tx0
  170.  
  171. ---------------------------------------------------------------------------------------
  172.  
  173. WorkBench
  174.  
  175.  
  176. ~$ sudo apt-get install bison build-essential graphviz git python-arvados-python-client arvados-workbench
  177.  
  178. secret:
  179. 2p2ctupulat0up2b4wh82dvnujkuvjstx1fus6malebfhuuajrn380fyg6zc156snflajffjkbqhrz
  180.  
  181.  
  182. server {
  183. listen 10.2.213.67:9000;
  184. server_name localhost-workbench;
  185.  
  186. root /var/www/arvados-workbench/current/public;
  187. index index.html index.htm index.php;
  188.  
  189. passenger_enabled on;
  190. # If you're using RVM, uncomment the line below.
  191. #passenger_ruby /usr/local/rvm/wrappers/default/ruby;
  192.  
  193. # `client_max_body_size` should match the corresponding setting in
  194. # the API server's Nginx configuration.
  195. client_max_body_size 128m;
  196. }
  197.  
  198. upstream workbench {
  199. server 10.2.213.67:9000 fail_timeout=10s;
  200. }
  201.  
  202.  
  203. -------SSL---------------
  204.  
  205. sudo mkdir /root/ssl
  206. sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /root/ssl/server.key -out /root/ssl/servet.crt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement