You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

Create VMs on Nebula

  1. If the is a new instance for gltg and you intend to use the current database VMs, you will need to build 3 new VMS
    1. Nginx proxy server
    2. Clowder Server
    3. Geodashboard Server
  2. VMs on Nebula are created with a script that uses python-openstackclient (tested on python-openstackclient==3.4.1) (probably some other pip libraries as well).  It is recommended to create a virtual
    1. set up the environment.  In a linux (mac) shell within the viritualenv
      1. export OS_AUTH_URL=http://nebula.ncsa.illinois.edu:5000/v2.0
        export OS_TENANT_ID=c4121a001a8240d4a8b701d664ef4bf0
        export OS_TENANT_NAME="GLTG"							# This is for GLTG project, change to your project name
        export OS_PROJECT_NAME="GLTG"							# This is for GLTG project, change to your project name
        export OS_USERNAME="username"							# Your Nebula username
        export OS_PASSWORD="password"							# Your Nebula password
        export OS_REGION_NAME="RegionOne"
    2. Run the script 

      1. Get the script https://opensource.ncsa.illinois.edu/bitbucket/snippets/6b41ea2cfea041cb822d66b909a7bf31

      2. run script (make sure you have correct permissions if it fails to run (use chmod 755 makevm.sh)):

        ./makevm.sh -n <name of new VM> -k <name of key>

        for example, creating a new vm named "ilnlrs-dev" with nebula key pair "gltg"

        ./makevm.sh -n ilnlrs-dev -k gltg

Setup Nginx Server

  1. Login to the Nginx server.  If you are using the project key pair it will look like this (make sure you have the key in your .ssh folder, get it from Nebula interface https://nebula.ncsa.illinois.edu/dashboard/project/access_and_security/:

    ssh -i ~/.ssh/<key> ubuntu@<vm floating ip address>
  2. Install Nginx:

    apt-get install nginx
  3. Edit nginx config 

    sudo vim /etc/nginx/sites-available/gltg 	# creates file name gltg and opens vim editor
  4. populate config

    server {
      listen 80;
      client_max_body_size 0;
    
      proxy_read_timeout 300;  # answer from server, 5 min
      proxy_send_timeout 300;  # chunks to server, 5 min
    
      proxy_set_header   Host $host;
      proxy_set_header   X-Real-IP $remote_addr;
      proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header   X-Forwarded-Proto $scheme;
      proxy_http_version 1.1;
      port_in_redirect   off;
    
      root /usr/share/nginx/html;
      index index.html index.htm;
    
      # Deny all attempts to access hidden files
      # such as .htaccess, .htpasswd, .DS_Store (Mac).
      location ~ /\. {
        deny all;
      }
    
      location / {
          try_files $uri $uri/ /index.html;
      }
    
      rewrite ^/geodashboard$ /geodashboard/ permanent;
      location /geodashboard {
        proxy_pass http://<geodashboard floating IP>:9000;				# replace <geodashboard floating IP> with the floating IP of your geodashboard machine
      }
    
      rewrite ^/clowder$ /clowder/ permanent;
      location /clowder/ {
        proxy_pass http://<clowder floating IP>:9000;					# replace <clowder floating IP> with the floating IP of your geodashboard machine
      }
    }
  • No labels