{{ result.object.name }}
-{{ result.object.body }}
-{% empty %} -No results found.
-{% endfor %} -``` -#### Searching - -With default url configuration you need to make a get request with parameter named `q` to action `/search`. - -```html - -``` -The [Haystack home page](http://haystacksearch.org/) is great resource for additional documentation. - - -##Upgrading the Searchly ElasticSearch Add-on -To upgrade from a smaller to a more powerful plan use the addon.upgrade command. - -``` -$ cctrlapp APP_NAME/DEP_NAME addon.upgrade searchly.OPTION_OLD searchly.OPTION_NEW -``` - -##Downgrading the Searchly ElasticSearch Add-on -To downgrade to a smaller plan use the addon.downgrade command. - -``` -$ cctrlapp APP_NAME/DEP_NAME addon.downgrade searchly.OPTION_OLD searchly.OPTION_NEW -``` - -##Removing the Searchly ElasticSearch Add-on -The Searchly ElasticSearch Add-on can be removed from the deployment by using the addon.remove command. - -``` -$ cctrlapp APP_NAME/DEP_NAME addon.remove searchly.OPTION -``` - -## Searchly Dashboard - -You can find usefull information about your indices and access analytics information about your search queries. - - - -##Internal Access -It's recommended to the read database credentials from the creds.json file. The location of the file is available in the CRED_FILE environment variable. Reading the credentials from the creds.json file ensures your app is always using the correct credentials. For detailed instructions on how to use the creds.json file please refer to the section about Add-on Credentials in the general documentation. - -##Searchly ElasticSearch Code Examples -Please ensure to check our [Searchly Github](https://github.com/searchbox-io) account for sample applications with various languages and frameworks. - -##Support -All Searchly support and runtime issues should be submitted via one of the cloudControl Support channels](https://www.cloudcontrol.com/dev-center/support). -Any non-support related issues or product feedback is welcome via email at: support@searchly.com diff --git a/Add-on Documentation/Data Processing/Worker.md b/Add-on Documentation/Data Processing/Worker.md index a4caf1c..6af2921 100644 --- a/Add-on Documentation/Data Processing/Worker.md +++ b/Add-on Documentation/Data Processing/Worker.md @@ -9,23 +9,23 @@ Each worker started via the Worker add-on runs in a seperate isolated container. Before you can start a worker, add the add-on with the addon.add command. ~~~ -$ cctrlapp APP_NAME/DEP_NAME addon.add worker.single +$ ironcliapp APP_NAME/DEP_NAME addon.add worker.single ~~~ ## Starting a Worker -Workers can be started via the command line client's worker.add command. +Workers can be started via the command line client's worker.add command. -For the Luigi stack (only supporting PHP), use the PHP filename as the `WORKER_NAME`. But for apps on the Pinky stack, first specifiy how to start the worker by adding a new line to your app's `Procfile` and then use that as the `WORKER_NAME`. +To specify how to start a worker add a new line to your app's `Procfile` and then use that as the `WORKER_NAME`. ~~~ -$ cctrlapp APP_NAME/DEP_NAME worker.add WORKER_NAME [WORKER_PARAMS] +$ ironcliapp APP_NAME/DEP_NAME worker.add WORKER_NAME [WORKER_PARAMS] ~~~ Enclose multiple WORKER_PARAMS in double quotes. ~~~ -$ cctrlapp APP_NAME/DEP_NAME worker.add WORKER_NAME "PARAM1 PARAM2 PARAM3" +$ ironcliapp APP_NAME/DEP_NAME worker.add WORKER_NAME "PARAM1 PARAM2 PARAM3" ~~~ ## List Running Workers @@ -33,7 +33,7 @@ $ cctrlapp APP_NAME/DEP_NAME worker.add WORKER_NAME "PARAM1 PARAM2 PARAM3" To get a list of currently running workers use the worker command. ~~~ -$ cctrlapp APP_NAME/DEP_NAME worker +$ ironcliapp APP_NAME/DEP_NAME worker Workers nr. wrk_id 1 WRK_ID @@ -42,7 +42,7 @@ Workers You can also get all the worker details by appending the WRK_ID to the worker command. ~~~ -$ cctrlapp APP_NAME/DEP_NAME worker WRK_ID +$ ironcliapp APP_NAME/DEP_NAME worker WRK_ID Worker wrk_id : WRK_ID command : WORKER_NAME @@ -58,7 +58,7 @@ Workers can be either stopped via the command line client or by exiting the proc To stop a running worker via the command line use the worker.remove command. ~~~ -$ cctrlapp APP_NAME/DEP_NAME worker.remove WRK_ID +$ ironcliapp APP_NAME/DEP_NAME worker.remove WRK_ID ~~~ To get the WRK_ID refer to the listing workers section above. @@ -75,10 +75,10 @@ For more details refer to the [PHP example](#php-worker-example) below. ## Worker log -As already explained in the [Logging section](https://www.cloudcontrol.com/dev-center/Platform%20Documentation#logging) all stdout and stderr output of workers is redirected to the worker log. To see the output in a tail -f like fashion use the log command. +As already explained in the [Logging section](/Platform Documentation.md/#logging) all stdout and stderr output of workers is redirected to the worker log. To see the output in a tail -f like fashion use the log command. ~~~ -$ cctrlapp APP_NAME/DEP_NAME log worker +$ ironcliapp APP_NAME/DEP_NAME log worker [Fri Dec 17 13:39:41 2010] WRK_ID Started Worker (command: 'WORKER_NAME', parameter: 'PARAM1 PARAM2 PARAM3') [Fri Dec 17 13:39:42 2010] WRK_ID Hello PARAM1 PARAM2 PARAM3 [...] @@ -89,7 +89,7 @@ $ cctrlapp APP_NAME/DEP_NAME log worker To remove the Worker add-on use the addon.remove command. ~~~ -$ cctrlapp APP_NAME/DEP_NAME addon.remove worker.single +$ ironcliapp APP_NAME/DEP_NAME addon.remove worker.single ~~~ ## PHP Worker Example @@ -123,8 +123,8 @@ while(true) { Running this worker with the exit code set to 2 would result in the following output and the worker stopping itself. ~~~ -$ cctrlapp APP_NAME/DEP_NAME worker.add WORKER_NAME 2 -$ cctrlapp APP_NAME/DEP_NAME log worker +$ ironcliapp APP_NAME/DEP_NAME worker.add WORKER_NAME 2 +$ ironcliapp APP_NAME/DEP_NAME log worker [Tue Apr 12 09:15:54 2011] WRK_ID Started Worker (command: 'WORKER_NAME', parameter: '2') [Tue Apr 12 09:15:54 2011] WRK_ID step: 1 [Tue Apr 12 09:15:55 2011] WRK_ID step: 2 diff --git a/Add-on Documentation/Data Storage/Cloudant.md b/Add-on Documentation/Data Storage/Cloudant.md deleted file mode 100644 index adbf236..0000000 --- a/Add-on Documentation/Data Storage/Cloudant.md +++ /dev/null @@ -1,57 +0,0 @@ -# Cloudant - -With cloudControl, every deployment can feature a highly available hosted CouchDB provided by [Cloudant](https://cloudant.com/). - -## Adding or removing the Cloudant Add-on - -The database comes in different sizes and prices. It can be added by executing the command addon.add: - -~~~ -$ cctrlapp APP_NAME/DEP_NAME addon.add cloudant.OPTION -~~~ -*.option* represents the plan size, e.g. cloudant.basic - - -## Upgrade the Cloudant Add-on - -Upgrading to another option can easily be done: - -~~~ -$ cctrlapp APP_NAME/DEP_NAME addon.upgrade cloudant.OPTION_OLD cloudant.OPTION_NEW -~~~ - -##Downgrade the Cloudant Add-on - -Downgrading to another option can easily be done: - -~~~ -$ cctrlapp APP_NAME/DEP_NAME addon.downgrade cloudant.OPTION_OLD cloudant.OPTION_NEW -~~~ - -##Removing the Cloudant add-on - -Similarily, an add-on can also be removed from the deployment easily. The costs only apply for the time the add-on was active: - -~~~ -$ cctrlapp APP_NAME/DEP_NAME addon.remove cloudant.OPTION -~~~ -#Database credentials - -##Internal access credentials - -It's recommended to the read database credentials from the creds.json file. The location of the file is available in the `CRED_FILE` environment variable. Reading the credentials from the creds.json file ensures your app is always using the correct credentials. For detailed instructions on how to use the creds.json file please refer to the section about [Add-on Credentials](https://www.cloudcontrol.com/dev-center/Platform%20Documentation#add-ons) in the general documentation. - -The JSON file has the following structure: - -~~~ -{ - "CLOUDANT":{ - "CLOUDANT_DATABASE":"depx11xxx22", - "CLOUDANT_PASSWORD":"asdfasdfasdf", - "CLOUDANT_PORT":"3306", - "CLOUDANT_HOSTNAME":"cloudantdb.asdf.eu-1.rds.amazonaws.com", - "CLOUDANT_USERNAME":"depx11xxx22" - } -} -~~~ - diff --git a/Add-on Documentation/Data Storage/ElephantSQL.md b/Add-on Documentation/Data Storage/ElephantSQL.md deleted file mode 100644 index 8aeb94d..0000000 --- a/Add-on Documentation/Data Storage/ElephantSQL.md +++ /dev/null @@ -1,51 +0,0 @@ -# ElephantSQL: PostgreSQL as a Service - -The most advanced open-source database, hosted in the cloud. - -As a full-featured, open-source relational DBMS (RDBMS), PostgreSQL boasts many characteristics designed to support high-transaction, mission-critical applications. - -## Adding the ElephantSQL Add-on - -To add the ElephantSQL Add-on use the addon.add command. - -~~~ -$ cctrlapp APP_NAME/DEP_NAME addon.add elephantsql.OPTION -~~~ -Replace `elephantsql.OPTION` with a valid option, e.g. `elephantsql.turtle`. - -When added, ElephantSQL automatically creates a new user account with your email adress. You can manage the Add-on within the [web console](https://www.cloudcontrol.com/console) (go to the specific deployment and click the link "elephantsql.OPTION"). - -## Upgrading the ElephantSQL Add-on - -To upgrade from a smaller to a more powerful plan use the addon.upgrade command. - -~~~ -$ cctrlapp APP_NAME/DEP_NAME addon.upgrade elephantsql.OPTION_OLD elephantsql.OPTION_NEW -~~~ - -Please note: Upgrading works only between shared plans or between dedicated -plans. To upgrade from a shared to a dedicated plan, you would need to export -your data from the shared plan first and reimport it to the dedicated plan -later. - -## Downgrading the ElephantSQL Add-on - -To downgrade to a smaller plan use the addon.downgrade command. - -~~~ -$ cctrlapp APP_NAME/DEP_NAME addon.downgrade elephantsql.OPTION_OLD elephantsql.OPTION_NEW -~~~ - -## Removing the ElephantSQL Add-on - -The ElephantSQL Add-on can be removed from the deployment by using the addon.remove command. - -~~~ -$ cctrlapp APP_NAME/DEP_NAME addon.remove elephantsql.OPTION -~~~ - -### Internal Access - -It's recommended to the read database credentials from the creds.json file. The location of the file is available in the `CRED_FILE` environment variable. Reading the credentials from the creds.json file ensures your app is always using the correct credentials. For detailed instructions on how to use the creds.json file please refer to the section about [Add-on Credentials](https://www.cloudcontrol.com/dev-center/Platform%20Documentation#add-ons) in the general documentation. - -You can also find a ready-to-deploy example application on [Github](https://github.com/ElephantSQL/ruby-postgresql-example.git). diff --git a/Add-on Documentation/Data Storage/Flying Sphinx.md b/Add-on Documentation/Data Storage/Flying Sphinx.md deleted file mode 100644 index 19fe87a..0000000 --- a/Add-on Documentation/Data Storage/Flying Sphinx.md +++ /dev/null @@ -1,42 +0,0 @@ -# Flying Sphinx (Alpha) - -Flying Sphinx is an Add-on for cloudControl which lets you use Thinking Sphinx (and thus, Sphinx) for all your search needs. - -## Adding or removing the Flying Sphinx Add-on - -The Add-on comes in different sizes and prices. It can be added by executing the command addon.add: - -~~~ -$ cctrlapp APP_NAME/DEP_NAME addon.add flying_sphinx.OPTION -~~~ -".option" represents the plan size, e.g. flying_sphinx.wooden - -## Upgrade the Flying Sphinx Add-on - -Upgrading to another option can easily be done: - -~~~ -$ cctrlapp APP_NAME/DEP_NAME addon.upgrade flying_sphinx.OPTION_OLD flying_sphinx.OPTION_NEW -~~~ -## Downgrade the Flying Sphinx Add-on - -Downgrading to another option can easily be done: - -~~~ -$ cctrlapp APP_NAME/DEP_NAME addon.downgrade flying_sphinx.OPTION_OLD flying_sphinx.OPTION_NEW -~~~ - -## Removing the Flying Sphinx Add-on - -Similarily, an Add-on can also be removed from the deployment easily. The costs only apply for the time the Add-on was active: - -~~~ -$ cctrlapp APP_NAME/DEP_NAME addon.remove flying_sphinx.OPTION -~~~ - -# Add-on Credentials - -## Internal access credentials - -It's recommended to the read database credentials from the creds.json file. The location of the file is available in the `CRED_FILE` environment variable. Reading the credentials from the creds.json file ensures your app is always using the correct credentials. For detailed instructions on how to use the creds.json file please refer to the section about [Add-on Credentials](https://www.cloudcontrol.com/dev-center/Platform%20Documentation#add-ons) in the general documentation. - diff --git a/Add-on Documentation/Data Storage/MemCachier.md b/Add-on Documentation/Data Storage/MemCachier.md deleted file mode 100644 index e0c75ff..0000000 --- a/Add-on Documentation/Data Storage/MemCachier.md +++ /dev/null @@ -1,404 +0,0 @@ -# MemCachier Add-on - -[MemCachier](http://www.memcachier.com) is an implementation of the [Memcached](http://memcached.org) in-memory key/value store used for caching data. It is a key technology in modern web applications for scaling and reducing server loads. The MemCachier Add-on manages and scales clusters of Memcached servers so you can focus on your app. Tell us how much memory you need and get started for free instantly. Add capacity later as you need it. - -The information below will quickly get you up and running with the MemCachier Add-on for cloudControl. For information on the benefits of MemCachier and how it works, please refer to the more extensive [User Guide](http://www.memcachier.com/documentation/memcache-user-guide/). - -Getting started ------ - -Start by installing the Add-on: - - $ cctrlapp APP_NAME/DEP_NAME addon.add memcachier.dev - -You can start with more memory if you know you'll need it: - - $ cctrlapp APP_NAME/DEP_NAME addon.add memcachier.100mb - $ cctrlapp APP_NAME/DEP_NAME addon.add memcachier.250mb - ... etc ... - -Next, setup your app to start using the cache. We have documentation for the following languages and frameworks: - - * [Ruby](#ruby) - * [Rails](#rails) - * [Python](#python) - * [PHP](#php) - * [Java](#java) - -Your credentials may take up to three (3) minutes to be synced to our servers. You may see authentication errors if you start using the cache immediately. - -Ruby ------- - -Start by adding the [memcachier](https://github.com/memcachier/memcachier-gem) and [dalli](http://github.com/mperham/dalli) gems to your Gemfile. - -~~~ruby -gem 'memcachier' -gem 'dalli' -~~~ - -Then bundle install: - -~~~ -$ bundle install -~~~ - -`Dalli` is a Ruby Memcached client, and the `memcachier` gem modifies the environment (`ENV`) such that the environment variables set by MemCachier will work with Dalli. Once these gems are installed you can start writing code. The following is a basic example using Dalli. - -~~~ruby -require 'sinatra' -require 'dalli' -require 'json' -require 'memcachier' - -def getVisits() - - config = { - :srv => ENV["MEMCACHIER_SERVERS"], - :usr => ENV["MEMCACHIER_USERNAME"], - :pwd => ENV["MEMCACHIER_PASSWORD"] - } - - cache=Dalli::Client.new(config[:srv],{:username => config[:usr],:password => config[:pwd]}) - - count=cache.get(request.ip) - if count.nil? - count=0 - end - - count+=1 - cache.set(request.ip,count) - - return count -end - -get '/' do - count=getVisits - ""+ - ""+ - "Hello #{request.ip}
"+ - "This is visit #{count}"+ - ""+ - "" -end -~~~ - -Rails ------ - -Start by adding the [memcachier](https://github.com/memcachier/memcachier-gem) and [dalli](http://github.com/mperham/dalli) gems to your Gemfile. We’ve built a small Rails example here: [MemCachier Rails Sample App](https://github.com/memcachier/memcachier-gis). - -~~~ruby -gem 'memcachier' -gem 'dalli' -~~~ - -Then bundle install: - -~~~term -$ bundle install -~~~ - -`Dalli` is a Ruby Memcached client, and the `memcachier` gem modifies the environment (`ENV`) such that the environment variables set by MemCachier will work with Dalli. Once these gems are installed you'll want to configure the Rails cache_store appropriately. Modify `config/environments/production.rb` with the following: - -~~~ruby -config.cache_store = :dalli_store -~~~ - -In your development environment, Rails.cache defaults to a simple in-memory store and so it doesn't require a running Memcached. - -From here you can use the following code examples to use the cache in your Rails app: - -~~~ruby -Rails.cache.write("foo", "bar") -puts Rails.cache.read("foo") -~~~ - -Without the `memcachier` gem, you’ll need to pass the proper credentials to Dalli in `config/environments/production.rb`: - -~~~ruby -config.cache_store = :dalli_store, ENV["MEMCACHIER_SERVERS"], - {:username => ENV["MEMCACHIER_USERNAME"], - :password => ENV["MEMCACHIER_PASSWORD"]} -~~~ - -Python ------ - -You can use many Memcached clients for python. In this example we are gonig to use `Python-Binary-Memcached` client with built in SASL support. Run the following commands on your local machine: - -~~~ -$ pip install python-binary-memcached -$ pip freeze > requirements.txt -~~~ - -Make sure your `requirements.txt` file contains this requirement (note that your versions may differ than what’s below): - -~~~ -python-binary-memcached==0.14 -~~~ - -Then you can put this code in you server.py and start caching: - -~~~python -import os -import cgi -import json -import bmemcached -from flask import Flask -from flask import request -from random import randint - -app = Flask(__name__) - -@app.route('/') -def hello(): - count=1 - try: - cred_file = open(os.environ["CRED_FILE"]) - data = json.load(cred_file) - creds = data['MEMCACHIER'] - config = { - 'srv': str(creds['MEMCACHIER_SERVERS']).split(','), - 'usr': str(creds['MEMCACHIER_USERNAME']), - 'pwd': str(creds['MEMCACHIER_PASSWORD']) - } - except IOError: - print 'Could not open file' - - client=bmemcached.Client(config['srv'], config['usr'], config['pwd']) - ipaddr=str(request.headers['X-Forwarded-For']) - if client.get(ipaddr) is not None: - count=int(client.get(ipaddr))+1 - client.set(ipaddr, str(count)) - - return "\n\ - \n\ -Hello " + ipaddr + "
\n\ - This is visit " + str(count) +"\n\ - \n\ - " - -if __name__ == '__main__': - port = int(os.environ.get('PORT', 5000)) - app.run(host='0.0.0.0', port=port) -~~~ - -PHP ------- - -Memcached provided by MemCachier can be used like this: - -~~~php - array_map(function($x) {return explode(":", $x);}, explode(",", $creds['MEMCACHIER']['MEMCACHIER_SERVERS'])), - 'USERNAME' => $creds['MEMCACHIER']['MEMCACHIER_USERNAME'], - 'PASSWORD' => $creds['MEMCACHIER']['MEMCACHIER_PASSWORD'], - ); - $m = new Memcached(); - $m->setOption(Memcached::OPT_BINARY_PROTOCOL, 1); - $m->setSaslAuthData($config['USERNAME'], $config['PASSWORD']); - $m->addServers($config['SERVERS']); - - $current_count = (int)$m->get('count') + 1; - $m->set('count', $current_count); -?> - - -Hello !
-This is visit number .
- - -~~~ - -More information on how to use php-memcached can be found on [php.net](http://php.net/manual/en/book.memcached.php). The php-memcached extension is part of the cloudControl stacks. - -Java ----- - -In this short example we will show you how to integrate your Java application with Memcachier Add-on. We will use `spymemcached` library with SASL authentication support. To use it in your project, just specify additional dependency in your `pom.xml` file: - -~~~xml -... -| Language | -Bindings | -
|---|---|
| Ruby | -dalli | -
| Python | -- pylibmc - | -
| Django | -- django-pylibmc - | -
| PHP | -- PHP-Memcached - | -
| Java | -- spymemcached - | -