{{ 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 deleted file mode 100644 index f09f866..0000000 --- a/Add-on Documentation/Data Processing/Worker.md +++ /dev/null @@ -1,151 +0,0 @@ -# Worker Add-on - -Workers are long running background processes. They are typically used for -anything from sending emails to running heavy calculations or rebuilding caches -in the background. - -Each worker started via the Worker add-on runs in a seperate isolated -container. The containers have exactly the same runtime environment defined by -the stack chosen and the buildpack used and have the same access to all of the -deployments add-ons. - -Note: Workers sometimes get interrupted and restarted on a different host for -the following reasons: - - single instances can run into issues and need to be replaced - - containers are redistributed to provide the best performance - - security updates are applied - -This means all your worker operations should be idempotent. If possible a `SIGTERM` -signal is send to your worker before the shutdown. - -## Adding the Worker Add-on - -Before you can start a worker, add the add-on with the addon.add command. - -~~~ -$ cctrlapp APP_NAME/DEP_NAME addon.add worker.single -~~~ - -## Starting a Worker - -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`. - -~~~ -$ cctrlapp 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" -~~~ - -## List Running Workers - -To get a list of currently running workers use the worker command. - -~~~ -$ cctrlapp APP_NAME/DEP_NAME worker -Workers - nr. wrk_id - 1 WRK_ID -~~~ - -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 -Worker -wrk_id : WRK_ID -command : WORKER_NAME -params : "PARAM1 PARAM2 PARAM3" -~~~ - -## Stopping Workers - -Workers can be either stopped via the command line client or by exiting the process with a zero exit code. - -### Via Command Line - -To stop a running worker via the command line use the worker.remove command. - -~~~ -$ cctrlapp APP_NAME/DEP_NAME worker.remove WRK_ID -~~~ - -To get the WRK_ID refer to the listing workers section above. - -### Via Exit Codes - -To stop a worker programatically use UNIX style exit codes. There are three distinct exit codes available. - - * exit (0); // Everything OK. Worker will be stopped. - * exit (1); // Error. Worker will be restarted. - * exit (2); // Error. Worker will be stopped. - -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. - -~~~ -$ cctrlapp 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 -[...] -~~~ - -## Removing the Worker Add-on - -To remove the Worker add-on use the addon.remove command. - -~~~ -$ cctrlapp APP_NAME/DEP_NAME addon.remove worker.single -~~~ - -## PHP Worker Example - -The following example shows how to use the exit codes to restart or stop a worker. - -~~~php -// read exit code parameter -$exitCode = isset($argv[1]) && (int)$argv[1] > 0 ? (int)$argv[1] : 0; -$steps = 5; - -$counter = 1; -while(true) { - print "step: " . ($counter) . PHP_EOL; - if($counter == $steps){ - if($exitCode == 0) { - print "All O.K. Exiting." . PHP_EOL; - } else if ($exitCode == 2){ - print "An error occured. Exiting." . PHP_EOL; - } else { - print "An error occured. Restarting." . PHP_EOL; - } - print "Exitcode: " . $exitCode . PHP_EOL . PHP_EOL; - exit($exitCode); - } - sleep(1); - $counter++; -} -~~~ - -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 -[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 -[Tue Apr 12 09:15:56 2011] WRK_ID step: 3 -[Tue Apr 12 09:15:57 2011] WRK_ID step: 4 -[Tue Apr 12 09:15:58 2011] WRK_ID step: 5 -[Tue Apr 12 09:15:58 2011] WRK_ID An error occured. Exiting. -[...] -~~~ - 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/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/MongoLab.md b/Add-on Documentation/Data Storage/MongoLab.md deleted file mode 100644 index e060afc..0000000 --- a/Add-on Documentation/Data Storage/MongoLab.md +++ /dev/null @@ -1,81 +0,0 @@ -# MongoLab - -MongoLab is the cloud-hosted MongoDB solution you've been looking for! MongoLab provides everything you need to make managing your database and data remarkable easy. - -## Adding MongoLab - -The MongoLab Add-on can be added to any deployment from the cctrlapp command line: - -~~~ -$ cctrlapp APP_NAME/DEP_NAME addon.add mongolab.OPTION -~~~ - -For your OPTION, select one of MongoLab's plan offerings: free, small, medium, large, xlarge. For more information, click [here](https://www.cloudcontrol.com/add-ons/mongolab). - -## For example: - -~~~ -$ cctrlapp APP_NAME/DEP_NAME addon.add mongolab.large -~~~ - -When added, MongoLab automatically creates a new user account and database in an Amazon EC2 cloud. You can manage your database and data easily from the [web console](https://www.cloudcontrol.com/console) by clicking the MongoLab add-on entry on your app's deployment page, and you gain immediate access to MongoLab customer support. Email [support@mongolab.com](mailto:support@mongolab.com) with any questions. - -## Internal access credentials - -Your MongoLab database connection URI is provided in the CRED_FILE environment variable, a JSON document that stores credentials from your add-on providers. This allows you to avoid hard-coding. - -Note: In the event that MongoLab must update your MONGOLAB_URI, you will be notified through the email address you\92ve provided to CloudControl. - -MongoLab's entry in your application CRED_FILE looks like this: - -~~~ -{ - "MONGOLAB":{ - "MONGOLAB_URI":"mongodb://APP_NAME:PASSWORD@ds031947.mongolab.com:31947//DBNAME", - } -} -~~~ - -Your app-name, password and db-name are all automatically generated by cloudControl and MongoLab. - -## Sample - -Here's a snippet of code to get you started: - -~~~ -selectDB(myDbName); -$col = new MongoCollection($db, myCollection); -$cursor = $col->find(); -foreach ($cursor as $doc) { echo $doc, ""; } -?> -~~~ - -## Upgrading to a larger MongoLab plan - -Currently, automatic plan changes are not supported by MongoLab. - -There are steps to follow if you've outgrown or anticipate outgrowing your current plan. First, stop your app and any other processes running against your database. Then: - -* Backup your database -* Remove your existing Add-on -* Add a new Add-on (see available plans here) -* Restore your database -* Redeploy your app - -Providing you're using the MONGOLAB_URI from your CRED_FILE, no application changes are required. - -## Removing MongoLab - -If you'd like to remove the MongoLab add-on, use the cctrlapp command line: - -~~~ -$ cctrlapp APP_NAME/DEP_NAME addon.remove mongolab.OPTION -~~~ - -Note: All data in your database will be lost if you remove the MongoLab add-on. - diff --git a/Add-on Documentation/Data Storage/OpenRedis.md b/Add-on Documentation/Data Storage/OpenRedis.md deleted file mode 100644 index 82d6e17..0000000 --- a/Add-on Documentation/Data Storage/OpenRedis.md +++ /dev/null @@ -1,44 +0,0 @@ -# OpenRedis (Beta) - -OpenRedis provides hosted Redis services available to all cloudControl apps. - -## Adding or removing the OpenRedis 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 openredis.OPTION -~~~ -".option" represents the plan size, e.g. openredis.test - -## Upgrade the OpenRedis Add-on - -Upgrading to another option can easily be done: - -~~~ -$ cctrlapp APP_NAME/DEP_NAME addon.upgrade openredis.OPTION_OLD openredis.OPTION_NEW -~~~ - -## Downgrade the OpenRedis Add-on - -Downgrading to another option can easily be done: - -~~~ -$ cctrlapp APP_NAME/DEP_NAME addon.downgrade openredis.OPTION_OLD openredis.OPTION_NEW -~~~ - -## Removing the OpenRedis 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 openredis.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/PostgreSQLd.md b/Add-on Documentation/Data Storage/PostgreSQLd.md deleted file mode 100644 index ae5b779..0000000 --- a/Add-on Documentation/Data Storage/PostgreSQLd.md +++ /dev/null @@ -1,172 +0,0 @@ -# PostgreSQLd: Dedicated PostgreSQL Add-on - -High-availability, dedicated PostgreSQL databases are available for -mission-critical production deployments. The dedicated PostgreSQL Add-on is -based on [Amazon RDS] and uses master-slave replicated Multi-AZ instances. Read -slaves or reserved instances are currently not supported via the Add-on, but -you can always create a custom RDS instance in the EU region and connect your -app to it. We recommend using the [Config Add-on] to make the credentials of -the self-managed RDS instance available to your app. - -## Features of the cloudControl PostgreSQLd Add-on - -The PostgreSQLd Add-on comes with the following features: - -1. Easy, Managed Deployments - - Pre-configured Parameters - You can simply launch a PostgreSQL Instance - and connect your application within minutes without additional - configuration. - - Automatic Software Patching - cloudControl will make sure that the - PostgreSQL software powering your deployment stays up-to-date with the - latest patches. - -2. Backup & Recovery - - Automated Backups - Turned on by default, the automated backup feature - enables point-in-time recovery for your instance. - - DB Snapshots - DB Snapshots are available. [Email us] for more details. - -3. High Availability - - Multi-AZ Deployments - Once you create or modify your DB Instance, we - will automatically provision and manage a “standby” replica in a - different Availability Zone (independent infrastructure in a physically - separate location). Database updates are made concurrently on the primary - and standby resources to prevent replication lag. - -4. PostgreSQL Features Supported - - PostGIS - PostGIS is a spatial database extender for PostgreSQL - object-relational database. It adds support for geographic objects - allowing you to run location queries to be run in SQL. - - Language Extensions - PostgreSQL allows procedural languages to be loaded - into the database through extensions. Three language extensions are - included with PostgreSQL to support Perl, pgSQL and Tcl. - - Full Text Search Dictionaries - PostgreSQL supports Full Text Searching - that provides the capability to identify natural-language documents that - satisfy a query, and optionally to sort them by relevance to the query. - Dictionaries, besides improving search quality, normalization and removal - of stop words also improve performance of queries. - - HStore, JSON Data Types - PostgreSQL includes support for ‘JSON’ data - type and two JSON functions. These allow return of JSON directly from the - database server. PostgreSQL has an extension that implements the ‘hstore’ - data type for storing sets of key/value pairs within a single PostgreSQL - value. - - Core PostgreSQL engine features - For a detailed list of PostgreSQL core - engine features, please refer here. - -5. Dashboard - - View key operational metrics like CPU/ Memory/ Storage/ Connections/ Upgrade status for your DB Instance deployments via [Webconsole]. - -## Adding the PostgreSQLd Add-on - -To add the PostgreSQLd Add-on, use the `addon.add` command: -~~~bash -$ cctrlapp APP_NAME/DEP_NAME addon.add postgresqld.OPTION -~~~ -Replace `postgresqld.OPTION` with a valid option, e.g. `postgresqld.small`. See -[PostgreSQLd] in the Add-on Marketplace for pricing and options. - -Please note: After adding a dedicated PostgreSQL database, it can take up to 30 -minutes before the instance is available. Also, the credentials will only be -available after the instance is up and running. - -## Upgrading the PostgreSQLd Add-on - -To upgrade from a smaller to a more powerful plan, use the `addon.upgrade` command: -~~~bash -$ cctrlapp APP_NAME/DEP_NAME addon.upgrade postgresqld.OPTION_OLD postgresqld.OPTION_NEW -~~~ - -Please note: Upgrading the instance types is a multi-step process that first -upgrades the secondary, then promotes the secondary to the new master. After -this, the old master is updated and becomes the new secondary. This process -can take up to 65 minutes and can involve a 3 to 10 minute downtime. - -## Downgrading the PostgreSQLd Add-on - -To downgrade to a smaller plan, use the `addon.downgrade` command: -~~~bash -$ cctrlapp APP_NAME/DEP_NAME addon.downgrade postgresqld.OPTION_OLD postgresqld.OPTION_NEW -~~~ - -Please note: It is only possible to downgrade to plans with matching storage -sizes. - -## Removing the PostgreSQLd Add-on - -The PostgreSQLd Add-on can be removed from the deployment by using the -`addon.remove` command: -~~~bash -$ cctrlapp APP_NAME/DEP_NAME addon.remove postgresqld.OPTION -~~~ - -**Attention:** Removing the PostgreSQLd Add-on deletes all data in the database. - -## Replication and Failover - -All instances are master-slave replicated across two different availability -zones. In case of a failure of the master, an automatic failover to the slave -will trigger to restore availability. This failover process takes usually -between 3 and 10 minutes. - -## Database Credentials - -### 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. - -### External Access - -External access to the PostgreSQLd Add-on is available through an SSL encrypted -connection by using the `psql` command line client: -~~~bash -$ psql "host=POSTGRESQLD_HOST dbname=POSTGRESQLD_DATABASE sslmode=require" -U POSTGRESQLD_USERNAME -~~~ - -Or alternatively using URL: -~~~bash -$ psql POSTGRESQLD_URL -~~~ - -Replace the uppercase variables with the corresponding values shown by the `addon` command: -~~~bash -$ cctrlapp APP_NAME/DEP_NAME addon postgresqld.OPTION -Addon : postgresqld.small - Settings - POSTGRESQLD_PASSWORD : SOME_SECRET_PASSWORD - POSTGRESQLD_USER : SOME_SECRET_USER - POSTGRESQLD_HOST : SOME_HOST.eu-west-1.rds.amazonaws.com - POSTGRESQLD_DATABASE : SOME_DATABASE_NAME - POSTGRESQLD_PORT : 5432 - POSTGRESQLD_URL : SOME_DATABASE_URL -~~~ - -Similarly, imports and exports are equally simple. - -To **export** your data use the `pg_dump` command: -~~~bash -$ pg_dump "host=POSTGRESQLD_HOST dbname=POSTGRESQLD_DATABASE sslmode=require" -U POSTGRESQLD_USERNAME > PG_DUMP -~~~ -Or export your data using URL: -~~~bash -$ pg_dump POSTGRESQLD_URL > PG_DUMP -~~~ - -To **import** an sql file into a PostgreSQL database use the following command: -~~~bash -$ psql "host=POSTGRESQLD_HOST dbname=POSTGRESQLD_DATABASE sslmode=require" -U POSTGRESQLD_USERNAME < PG_DUMP -~~~ -Or import your data using URL: -~~~bash -$ psql POSTGRESQLD_URL < PG_DUMP -~~~ - -[Amazon RDS]: http://aws.amazon.com/rds/ -[Config Add-on]: https://www.cloudcontrol.com/add-ons/config -[PostgreSQLd]: https://www.cloudcontrol.com/add-ons/postgresqld -[Add-on Credentials]: https://www.cloudcontrol.com/dev-center/Platform%20Documentation#add-ons -[Email us]: mailto:support@cloudcontrol.de -[Webconsole]: https://www.cloudcontrol.com/console/login \ No newline at end of file diff --git a/Add-on Documentation/Deployment/Codeship.md b/Add-on Documentation/Deployment/Codeship.md deleted file mode 100644 index 5f9aaef..0000000 --- a/Add-on Documentation/Deployment/Codeship.md +++ /dev/null @@ -1,42 +0,0 @@ -# Codeship: Codeship is a simple to use Continuous Integration and Deployment service. - -Whenever you make changes to your application and push your Code we take the latest version of your code, run all your tests and, if you want, push to your staging and/or production application. Test and deploy your applications without the headache of setting up your own test server. Getting started takes less than two minutes and is fully integrated with cloudControl. - -## Adding the Codeship Add-on - -To add the Codeship Add-on use the addon.add command. - -~~~ -$ cctrlapp APP_NAME/DEP_NAME addon.add codeship.OPTION -~~~ -Replace `codeship.OPTION` with a valid option, e.g. `codeship.test`. - -When added, Codeship 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 "codeship.OPTION"). - -## Upgrading the Codeship Add-on - -To upgrade from a smaller to a more powerful plan use the addon.upgrade command. - -~~~ -$ cctrlapp APP_NAME/DEP_NAME addon.upgrade codeship.OPTION_OLD codeship.OPTION_NEW -~~~ - -## Downgrading the Codeship Add-on - -To downgrade to a smaller plan use the addon.downgrade command. - -~~~ -$ cctrlapp APP_NAME/DEP_NAME addon.downgrade codeship.OPTION_OLD codeship.OPTION_NEW -~~~ - -## Removing the Codeship Add-on - -The Codeship Add-on can be removed from the deployment by using the addon.remove command. - -~~~ -$ cctrlapp APP_NAME/DEP_NAME addon.remove codeship.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. diff --git a/Add-on Documentation/Deployment/Logentries.md b/Add-on Documentation/Deployment/Logentries.md deleted file mode 100644 index 5d012ac..0000000 --- a/Add-on Documentation/Deployment/Logentries.md +++ /dev/null @@ -1,33 +0,0 @@ -# Logentries - -[Logentries](https://logentries.com) provides logs collection, analysis, storage and presentation in a professional and meaningful way. - -## Adding Logentries -The Logentries Add-On can be added to every deployment with: - -~~~ -$ cctrlapp APP_NAME/DEP_NAME addon.add logentries.PLAN -~~~ - -When added, Logentries automatically creates a new account and log configuration including access token. After Add-on creation all stdout, stderr and syslog output within the container will be available in Logentries. You can access Logentries for your deployment within the [web console](https://www.cloudcontrol.com/console) (go to the specific deployment, choose "Add-Ons" tab and click Logentries login). - -## Removing Logentries - -~~~ -$ cctrlapp APP_NAME/DEP_NAME addon.remove logentries.PLAN -~~~ - -## Internal access credentials - -You can view Logentries token via: - -~~~ -$ cctrlapp APP_NAME/DEP_NAME addon logentries.PLAN -~~~ - -~~~ -Addon : logentries.PLAN - - Settings - LOGENTRIES_TOKEN : 10af1a9e-112c-4075-88c9-e06412f0cd8e -~~~ \ No newline at end of file diff --git a/Add-on Documentation/Deployment/Phrase.md b/Add-on Documentation/Deployment/Phrase.md deleted file mode 100644 index ee260ad..0000000 --- a/Add-on Documentation/Deployment/Phrase.md +++ /dev/null @@ -1,192 +0,0 @@ -# Phrase # - -phrase allows you to edit your translations directly on your site without having to manually edit localization files. This makes your whole translation process easy as pie. Use the in-place editor to translate content directly on your site or manage your translations with the powerful phrase Translation Center. - - -## Provisioning the add-on - -phrase can be attached to CloudControl via the command line client: - - $ cctrlapp APP_NAME/DEP_NAME addon.add phrase.PLAN - - -Once the add-on has been provisioned the `PHRASE_AUTH_TOKEN` will be available within your list of credentials. It contains your authentication token that lets you connect to the phrase service: - - $ cctrlapp APP_NAME/DEP_NAME addon | grep PHRASE_AUTH_TOKEN - PHRASE_AUTH_TOKEN: d219d3abcgcxBahs72K1 - - -## Installation and Usage - -phrase should be integrated in an own staging environment. If you haven't done so already, we recommend you set up a staging environment as explained in the [CloudControl Documentation](https://www.cloudcontrol.com/dev-center/Platform%20Documentation#development-staging-and-production-environments). The staging environment will be the place for your translators to edit your website content. -Of course, you can use your local development environment for integration as well. If you decide to do so, simply replace the staging with your development environment in the following steps. - -If you have any questions, contact us at [info@phraseapp.com](info@phraseapp.com) and we will be happy to guide you through the installation process. - - -### phrase command line tool ### - -Developers typically access phrase with the [phrase ruby gem](https://rubygems.org/gems/phrase) via command line: - - gem install phrase - -You are now able to use phrase to upload translations to the API and export new translation files form phrase as described in the next sections. - - -### Using with Symfony2 - -Simply follow the instructions from our documentation: [phraseapp.com/docs/installation/symfony2](https://phraseapp.com/docs/installation/symfony2) - - -### Using with Ruby / Rails / Sinatra - -*The following integration guide assumes your application uses bundler for gem dependency management.* - - -#### Add the gem - -Add the phrase gem to your staging environment: - - group :development, :staging do - gem 'phrase' - end - -and install the gem with the bundle command: - - $ bundle install - - -#### Initialize phrase - -First you need to enable phrase within your application and provide the authentication token. You can do this by adding the following two lines to an initializer (Rails) or in your main application file: - - Phrase.enabled = true - Phrase.auth_token = ENV['PHRASE_AUTH_TOKEN'] - -If you are using Sinatra, you might have to require phrase in your app file: - - if ENV['RACK_ENV'] == 'staging' - require "phrase" - end - -This will load phrase when you start your application in staging environment. - -Now initialize phrase with the auth token you received after adding the phrase add-on to your application: - - $ bundle exec phrase init --secret=YOUR_AUTH_TOKEN --default-locale=en - -This will generate a .phrase config file in your project root that includes your secret key. We recommend adding it to your .gitignore file. - -Next, upload the existing locale files from your app: - - $ bundle exec phrase push ./config/locales/ - -phrase now knows about your locales and the keys in your application. To enable the phrase in-place editor, simply add the javascript to your application layout file: - - - -In order to tell the i18n gem about the new locales that should be used in production you have to configure the load path as well. When using Rails you can set the load path in your production.rb: - - config.i18n.load_path = Dir[Rails.root.join('phrase', 'locales', '*.yml').to_s] - -If you're using Sinatra or something similar, you probably want to set it in the config.ru file: - - if ENV['RACK_ENV'] == 'production' - I18n.load_path = Dir[File.join(File.dirname(__FILE__), 'phrase', 'locales', '*.yml').to_s] - else - I18n.load_path = Dir[File.join(File.dirname(__FILE__), 'config', 'locales', '*.yml').to_s] - end - - -#### Deploy application to staging environment - -To finally get a look at phrase you simply have to deploy the application to your staging system and open it in the browser. - -You now should see your application with the phrase in-place editor on top of it. To create your first user with translation privileges, you have to log into phrase by following the "Login" link in your add-on management panel. - -After logging in, you can access the user management under the "Account" menu. Simply create a user with an email address and password of your choice. You can now edit your text content right on the site! - - -#### Deploy translations - -After you have finished translating your site, you will need to push the new translation files to production. In order to do so, you will first have to download them from phrase and add them to your project: - - $ bundle exec phrase pull - $ git add ./phrase/locales - $ git commit -m "added new translations" - -Now you can push the changes to your production repository: - - $ cctrlapp APP_NAME/DEP_NAME push - $ cctrlapp APP_NAME/DEP_NAME deploy - -The production system will now use the new locale files including your latest translations! - - -### Using with other platforms - -If you need support for a platform or language that is not yet supported just contact us at [info@phraseapp.com](info@phraseapp.com) - - -## Workflow - -With phrase your translation workflow will get much easier: - -1. Add a new feature to your app that requires translation -2. Add the new keys to phrase by uploading the locale files to phrase or creating them manually within the translation center -3. Deploy your new code to your staging environment and let your translators do their work -4. Download the new locale files from phrase and deploy them to production - - -## Translation Center - -Translation Center lets you manage: - -* Locales -* Keys -* Translations -* Users -* etc. - -To log in to Translation Center, view your add-on settings within your CloudControl console and follow the "Login" link next to the phrase addon. This will perform the sign in to phrase where you can manage your account, users, locales and more. - -*For more information on the features available within the phrase translation center please see the feature tour at [phraseapp.com/features](https://phraseapp.com/features).* - - -## Removing the add-on - -phrase can be removed via the command line client: - - $ cctrlapp APP_NAME/DEP_NAME addon.remove phrase.PLAN - -**Warning:** This will destroy all data associated with your phrase account and cannot be undone! - - -## Other platforms and languages - -phrase supports all common localization formats, including YAML, JSON, Gettext (.po), Properties, XLIFF, Android, iOS, ResX etc. - -You can always access your localization files and translations from within Translation Center. - -If you need support for a platform or language that is not yet supported just contact us at [info@phraseapp.com](info@phraseapp.com) - - -## Support - -If you have any questions regarding phrase, feel free to contact us at [phraseapp.com/support](https://phraseapp.com/support). - - -## Additional resources - -Additional resources are available at: - -* [Example application using Sinatra](https://github.com/phrase/phrase_example_cloudcontrol_app) -* [Support](https://phraseapp.com/support) -* [Full documentation](https://phraseapp.com/docs) diff --git a/Add-on Documentation/Deployment/Userbin.md b/Add-on Documentation/Deployment/Userbin.md deleted file mode 100644 index 27eaef0..0000000 --- a/Add-on Documentation/Deployment/Userbin.md +++ /dev/null @@ -1,333 +0,0 @@ -# Userbin - - -[Userbin](https://userbin.com) is the easiest way to setup, use and maintain a secure user authentication system for both your web and mobile apps, while keeping the users in your own database. - -Userbin provides a set of login, signup, and password reset forms that drop right into your application without any need of styling or writing markup. Connect your users via traditional logins or third party social networks. We take care of linking accounts across networks, resetting passwords and sending out necessary emails, while keeping everything safe and secure. - - - -## Adding the Userbin add-on -To add the Userbin add-on use the addon.add command. - -```bash -$ cctrlapp APP_NAME/DEP_NAME addon.add userbin.PLAN -``` - -Replace `userbin.PLAN` with a valid plan, e.g. `userbin.free`. - -When added, Userbin automatically creates a new account for you. You can access Userbin for your deployment within the [web console](https://www.cloudcontrol.com/console) (go to the specific deployment, choose "Add-Ons" tab and click Userbin login). - - -## Using with Ruby on Rails - - -### Installation and configuration - -Add the `userbin` gem to your `Gemfile` - -```ruby -gem "userbin" -``` - -Install the gem - -```bash -bundle install -``` - -Create `config/initializers/userbin.rb` and configure your credentials. - -```ruby -Userbin.configure do |config| - config.app_id = "YOUR_APP_ID" - config.api_secret = "YOUR_API_SECRET" -end -``` - -> If you don't configure the `app_id` and `api_secret`, the Userbin module will read the `USERBIN_APP_ID` and `USERBIN_API_SECRET` environment variables. - -Implement getter and setter for your user model. For more information about the available attributes in the profile see the [Userbin profile](https://userbin.com/docs/profile) documentation. - -```ruby -config.find_user = -> (userbin_id) do - User.find_by_userbin_id(userbin_id) -end - -# will be called when a user signs up -config.create_user = -> (profile) do - User.create! do |user| - user.userbin_id = profile.id - user.email = profile.email - user.photo = profile.image - end -end -``` - -Migrate your users to include a reference to the Userbin profile: - -```bash -rails g migration AddUserbinIdToUsers userbin_id:integer:index -rake db:migrate -``` - - -### Authenticating users - -Userbin keeps track of the currently logged in user which can be accessed through `current_user` in controllers, views, and helpers. This automatically taps into libraries such as the authorization library [CanCan](https://github.com/ryanb/cancan). - -```erb -<% if current_user %> - <%= current_user.email %> -<% else %> - Not logged in -<% end %> -``` - -To set up a controller with user authentication, just add this `before_filter`: - -```ruby -class ArticlesController < ApplicationController - before_filter :authorize! - - def index - current_user.articles - end -end -``` - -> You can always access the [Userbin profile](https://userbin.com/docs/profile) for the logged in user as `current_profile` when you need to access information that you haven't persisted in your user model. - - - -## Using with Node.js - -### Installation and configuration - -Install the `userbin` package. - -```bash -$ npm install userbin -``` - -Include the Userbin node packages in your app.js or server.js. - -```javascript -var userbin = require('userbin'); -``` - -Configure the Userbin module with the credentials you got from signing up. - -```javascript -userbin.config({ - appId: 'YOUR_APP_ID', - apiSecret: 'YOUR_API_SECRET' -}); -``` - -> If you don't configure the `appId` and `apiSecret`, the Userbin module will read the `USERBIN_APP_ID` and `USERBIN_API_SECRET` environment variables. - -Insert the Userbin authentication middleware after the cookieParser (and add the cookieParser if not present): - -```javascript -app.use(connect.cookieParser()); // or express.cookieParser() -app.use(userbin.authenticate()); -``` - -Implement getter and setter for your user model. For more information about the available attributes in the profile see the [Userbin profile](https://userbin.com/docs/profile) documentation. - -```javascript -userbin.config({ - findUser: function(userbinId, done) { - User.findOne({ userbinId: userbinId }, function(err, user) { - done(user); - }); - }, - - createUser: function(profile, done) { - var user = User.new({ - userbinId : profile.id, - email : profile.email, - photo : profile.image - }); - user.save(function(err, user) { - done(user); - }); - } -}) -``` - - -### Authenticating users - -Userbin keeps track of the currently logged in user which can be accessed in your controllers and views through the `req.currentUser` property which needs to be explicitly passed to your views. - -Insert the `userbin.authorize()` middleware to protect a route fron non-logged in users. - -```javascript -app.get('/account', userbin.authorize(), function(req, res) { - res.render('account', {currentUser: req.currentUser}); -}); -``` - -> You can always access the [Userbin profile](https://userbin.com/docs/profile) for the logged in user as `req.currentProfile` when you need to access information that you haven't persisted in your user model. - - - -## Using with PHP - -### Installation and configuration - -Download Userbin into your project: - -```bash -$ curl -O https://raw.github.com/userbin/userbin-php/master/userbin.php -``` - -All you need to is to include `userbin.php` at the top of your files, configure it with you App ID and API secret, and finally run the Userbin authentication sync. The `authenticate` method will make sure that the user session is refreshed when it expires. - -> If you're not using [output buffering](http://php.net/manual/en/book.outcontrol.php) this needs to be done before any output has been written since Userbin will modify headers. - -```php - -``` - -Include [Userbin.js](https://userbin.com/js/v0) at the bottom of all your web pages to enable form helpers and session handling. - -```php - ... - = Userbin::javascript_include_tag(); ?> -