Trial

This Trial guide will provide the instructions for setting an instance of the ClearBlade platform that runs on Amazon EC2.

Before you will be able to use the trial you will need to get a trialKey and a registrationKey from your ClearBlade contact.

Email sales@clearblade.com for more information

We will complete the following steps:

  1. Provision a cloud instance
  2. Install gcloud tools for accessing ClearBlade docker container registry
  3. Install docker
  4. Pull ClearBlade docker images
  5. Set trial and input variables
  6. Create Containers

The total process should take about 30 minutes

NOTE: Commands that include ITALIC_TEXT are variables that will be custom to your installation

Provision your Cloud instance

Complete the below section based on your operating system or cloud vendor

Using an Amazon EC2 instance

  1. Define a new instance

    • For trial ClearBlade recommends - Ubuntu Server 14.04 LTS(HVM), SSD Volume Type (Free tier eligible)
    • Set the network group to include the following settings

      Port Protocol Source
      443 tcp 0.0.0.0/0
      80 tcp 0.0.0.0/0
      8904 tcp 0.0.0.0/0
      1883 tcp 0.0.0.0/0
      22 tcp 0.0.0.0/0
  2. Shell into your newly created instance

  3. Go to the section “Install Container Tools”

Using a gCloud instance

  1. Install the gcloud sdk cli tool locally

    • $ curl https://sdk.cloud.google.com | bash
    • $ exec -l $SHELL
    • $ gcloud auth login (Now follow the link and copy paste the auth token into your terminal)
    • $ gcloud config set project api-project-320446546234
  2. Create a new VM instance
    $ gcloud compute instances create <server-name> --image container-vm --zone us-central1-a --machine-type n1-standard-1 --tags http-server,https-server,platform

  3. SSH into VM instance $ gcloud gcloud compute ssh –zone us-central1-a

  4. Add your user to the docker group $ sudo usermod -a -G docker

  5. Go to the section “Install Container Tools”

Install Container tools

Make the following shell commands

  1. $ export CLOUDSDK_CORE_DISABLE_PROMPTS=1
  2. $ curl https://sdk.cloud.google.com | bash
  3. $ exec -l $SHELL
  4. $ nano ~/cbAuth.json

    • paste in the following json object

      {
      “private_key_id”: “93c21159545a5eda0350badd1ac88d3e192ad24f”,
      “private_key”: “—–BEGIN PRIVATE KEY—–\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCxcEutj1K6vu1U\nsZlETTLIGXV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cjmdYTnV8rwqVijWZ95/yaJO8JzMoOft+oH\niCnTDwP2cGzyue5wPmxEr5dmzLffhHfI/Lkqc6q37EYVggAwZRSC53i6MED//WwO\nXjli56GFnGxp0KndNaQfVoYT+vkO31Nr2bogA1fQJqqovuEkmAZSXvu/AoGAaLmp\n3NNEI/Aqe0jBraAaYi/dAZ5JfIXbxlh9dtDZb+4SFUe8YYRwiSEcbNlmosS136AT\nQcGpubLlJlTAIDO1TWRpyAcXIR0bHdI4PF6ipTTJ5w94DM/XtkvflGO/pkFy/GEc\n0AyMP0od2gH3dQHBx3r0/6UiiAH03XzofKdTAmECgYEAy2Uhi2PHIzfk1dUfsoKR\nTP+cfs2VTuln5eeF8NwwNtUxoHP0T2Xl3fNWGuez2mxJ8mniq8QXSGZ1Gk2/TLYt\nxh2ufKdZBooAv17JR1F+m9/dSRlWl5sRNxg7OBR3g4EfwZyWdALlAug57sfyMGvn\nd384DBt9JQ67KXyUBHEBz2I\u003d\n—–END PRIVATE KEY—–\n”,
      “client_email”: “320446546234-19ecrjc8uhbfus4vh4jh4sceo7m8iu7f@developer.gserviceaccount.com”,
      “client_id”: “320446546234-19ecrjc8uhbfus4vh4jh4sceo7m8iu7f.apps.googleusercontent.com”,
      “type”: “service_account”
      }
      

    • save and quit

  5. $ gcloud auth activate-service-account --key-file cbAuth.json

  6. $ gcloud config set project api-project-320446546234

Install Docker

  1. Request the installation
  2. Add your user to the docker group
    • $ sudo usermod -aG docker USER Ex:ubuntu
  3. Exit your shell session
    • $ exit
  4. Restart your shell session
    • ssh -i mykey.pem ubuntu@54.1.1.1

Pull Docker ClearBlade Images

  1. $ gcloud docker pull gcr.io/api-project-320446546234/cb_postgres:2.0.0
  2. $ gcloud docker pull gcr.io/api-project-320446546234/clearblade:2.0.0
  3. $ gcloud docker pull gcr.io/api-project-320446546234/cb_nginx:2.0.0
  4. $ gcloud docker pull gcr.io/api-project-320446546234/cb_console:2.0.0

Set ClearBlade Trial Key

  1. $ echo YOUR_TRIAL_KEY > ~/dev_key

Create Containers

  1. $ docker run --name cb_data -v /var/clearblade/data:/var/lib/postgresql/data gcr.io/api-project-320446546234/cb_postgres:2.0.0 true

  2. $ docker run -d --name cb_postgres --volumes-from cb_data --restart always gcr.io/api-project-320446546234/cb_postgres:2.0.0

  3. $ docker run -d --name clearblade -v /var/clearblade/log:/var/log -e DEV_KEY=`cat ~/dev_key` -p 1883:1883 -p 8904:8904 --link cb_postgres:cb_postgres --restart always gcr.io/api-project-320446546234/clearblade:2.0.0

  4. $ docker run -d --name cb_console --restart always gcr.io/api-project-320446546234/cb_console:2.0.0

  5. $ docker run -d --name cb_nginx -p 80:80 -p 443:443 --restart always --link cb_console:cb_console --link clearblade:clearblade gcr.io/api-project-320446546234/cb_nginx:2.0.0

Browse your newly instantiated platform

  1. Open a local web browser
  2. Enter the IP address of your server
  3. In the top right select “Sign Up”
  4. Use the registration key you have been provided
  5. Complete the new developer form

You are now ready to complete your desired tutorial.

See the documentation for more information