Chapter Two Part Seven Section Three: How To Use Snova On Cloud Foundry

Looking for a simple, stable and significant VPS as your web hosting? Check out DigitalOcean, only $5 per month, and you can get $10 in credit just for signing up now.

As mentioned before, Snova still does NOT work for HTTPS, until you run it on Cloud Foundry, Heroku, OpenShift and/or some other PaaS platforms.

So, the following will show you how to install and use Snova on Cloud Foundry with 7 easy steps:

1. Create a Cloud Foundry account

Create a CloudFoundry account

On the Cloud Foundry signup page, enter your email address to request a invite, which will be sent to your Inbox with login username and password soon.

2. Install vmc

Install vmc

Vmc is the command-line interface based on Ruby and RubyGems for you to configure your applications and deploying them to Cloud Foundry.

For Windows, Ubuntu, Debian or some other systems, you can check out the official instructions, the following will show you how to install vmc on Mac.

Open the Terminal application, enter the following command line:

sudo gem install vmc

And enter your Mac password if necessary, then you can install vmc.

By the way, the installation will take a few minutes and you won't see anything until the gem is installed.

3. Download snova-c4-server-xxx.war

Download Snova c4 server

On the Snova Downloads webpage, download the "snova-c4-server-xxx.war" file and put it into a new empty folder, such as "snova-c4-server" used for the following step.

4. Deploy Snova c4 server to Cloud Foundry

Deploy Snova c4 server to Cloud Foundry

Open the Terminal application, enter the following command line:

cd /the-parth-to/snova-c4-server

You can also just drag the "snova-c4-server" folder and drop it behind the "cd" command.

After that, you can start to configure and deploy the Snova c4 server to Cloud Foundry by entering the following command lines one by one:

  • vmc target api.cloudfoundry.com
  • vmc login (To enter your Cloud Foundry username and password)
  • vmc push free-nuts (To replace free-nuts with any name you like for the Cloud Foundry app)
  • Would you like to deploy from the current directory? [Yn]: (To enter y)
  • Detected a Java Web Application, is this correct? [Yn]: (To enter y)
  • Application Deployed URL [free-nuts.cloudfoundry.com]: (To press the RETURN key)
  • Memory reservation (128M, 256M, 512M, 1G, 2G) [512M]: (To press the RETURN key)
  • How many instances? [1]: (To press the RETURN key)
  • Create services to bind to 'free-nuts'? [yN]: ( To enter n)
  • Would you like to save this configuration? [yN]: (To enter y)

If all the results are OK, you can visit the page of the following link:

free-nuts.cloudfoundry.com

And if you can see something like the following:

Welcome to snova-c4 server xxx!

Then you have successfully deployed the Snova server to Cloud Foundry.

5. Configure the Snova c4 client

Configure Snova c4 client

Find and open the "c4-client.conf" file via the following path:

.../snova-xxx/plugins/c4/conf/c4-client.conf

And uncomment the "WorkerNode [1]" line by changing "xyz" to your Cloud Foundry app name.

6. Configure snova.conf

Configure Snova.conf

Find and open the "snova.conf" file via the following path:

.../snova-xxx/conf/snova.conf

And change the "ProxyService" value from "GAE" to "C4".

7. Start Snova

Start Snova

After that, you can start Snova, and if you can see the following message:

Start plugin:C4 … Success

Then you can visit the HTTPS links normally.

Spread the love
This entry was posted in E-book and tagged , . Bookmark the permalink.