diff --git a/doc/manual/source/operations.rst b/doc/manual/source/operations.rst new file mode 100644 index 000000000000..7f1a0394a318 --- /dev/null +++ b/doc/manual/source/operations.rst @@ -0,0 +1,18 @@ +Operations +========== + +Certain operations in the CartoDB platform can be done using rake tasks or scripts that bundle several of them together. In this section you will instructions to carry out various common operations. + +Common operations in CartoDB include: + +.. toctree:: + + operations/create_users.rst + operations/create_orgs.rst + operations/change_feature_flags.rst + operations/changing_limits.rst + + + + + diff --git a/doc/manual/source/operations/change_feature_flags.rst b/doc/manual/source/operations/change_feature_flags.rst new file mode 100644 index 000000000000..bf0d6dab0acf --- /dev/null +++ b/doc/manual/source/operations/change_feature_flags.rst @@ -0,0 +1,158 @@ +Changing Feature Flags +====================== + +CartoDB uses feature flags, so different users can have access to different features of CartoDB. If you would like to enable or disable feature flags to one or all users or to a given organization, you can use the rake tasks described in this section. Feature flag creation and deletion are also covered. + + +Enabling a feature for all users +-------------------------------- + +Enabling a feature for all users is done with a rake task called ``enable_feature_for_all_users`` and it takes one parameter. + +* **Feature name** is the name of the feature flag to be enabled. For example: 'special_dashboard'. + +This task is executed like: + +``bundle exec rake cartodb:features:enable_feature_for_all_users[]`` + +And an example to enable the 'special_dashboard' feature would be: + +``bundle exec rake cartodb:features:enable_feature_for_all_users["special_dashboard"]`` + + +Enabling a feature for a given user +----------------------------------- + +Enabling a feature for a given user is done with a rake task called ``enable_feature_for_user`` and it takes two parameters. + +* **Feature name** is the name of the feature flag to be enabled. For example: 'special_dashboard'. +* **User's user name** is the user name of the user to whom the feature flag is to be enabled. For example: 'manolo'. + +This task is executed like: + +``bundle exec rake cartodb:features:enable_feature_for_user[,]`` + +**NOTE** Please be very careful **NOT** to leave a space between parameters, as it will cause rake to spit ``don't know how to build task`` error. + +And an example to enable the 'special_dashboard' feature for user with user name 'manolo' would be: + +``bundle exec rake cartodb:features:enable_feature_for_user["special_dashboard","manolo"]`` + + +Enabling a feature for a given organization +------------------------------------------- + +Enabling a feature for a given organization is done with a rake task called `'enable_feature_for_organization`` and it takes two parameters. + +* **Feature name** is the name of the feature flag to be enabled. For example: 'special_dashboard'. +* **Organization name** is the internal name ('cartodb' vs 'CartoDB Inc.') to which the feature flag is to be enabled. For example: 'cartodb'. + +This task is executed like: + +``bundle exec rake cartodb:features:enable_feature_for_organization[,]`` + +**NOTE** Please be very careful **NOT** to leave a space between parameters, as it will cause rake to spit ``don't know how to build task`` error. + +And an example to enable the 'special_dashboard' feature for organization 'cartodb' would be: + +``bundle exec rake cartodb:features:enable_feature_for_organization["special_dashboard","cartodb"]`` + + +Disabling a feature for all users +--------------------------------- + +Disabling a feature for all users is done with a rake task called ``disable_feature_for_all_users`` and it takes one parameter. + +* **Feature name** is the name of the feature flag to be disabled. For example: 'special_dashboard'. + +This task is executed like: + +``bundle exec rake cartodb:features:disable_feature_for_all_users[]`` + +And an example to disable the 'special_dashboard' feature would be: + +``bundle exec rake cartodb:features:disable_feature_for_all_users["special_dashboard"]`` + + +Disabling a feature for a given user +------------------------------------ + +Disabling a feature for a given user is done with a rake task called ``disable_feature_for_user`` and it takes two parameters. + +* **Feature name** is the name of the feature flag to be disabled. For example: 'special_dashboard'. +* **User's user name** is the user name of the user to whom the feature flag is to be disabled. For example: 'manolo'. + +This task is executed like: + +``bundle exec rake cartodb:features:disable_feature_for_user[,]`` + +**NOTE** Please be very careful **NOT** to leave a space between parameters, as it will cause rake to spit ``don't know how to build task`` error. + +And an example to disable the 'special_dashboard' feature for user with user name 'manolo' would be: + +``bundle exec rake cartodb:features:disable_feature_for_user["special_dashboard","manolo"]`` + + +Disabling a feature for a given organization +-------------------------------------------- + +Disabling a feature for a given organization is done with a rake task called `'disable_feature_for_organization`` and it takes two parameters. + +* **Feature name** is the name of the feature flag to be disabled. For example: 'special_dashboard'. +* **Organization name** is the internal name ('cartodb' vs 'CartoDB Inc.') to which the feature flag is to be disabled. For example: 'cartodb'. + +This task is executed like: + +``bundle exec rake cartodb:features:disable_feature_for_organization[,]`` + +**NOTE** Please be very careful **NOT** to leave a space between parameters, as it will cause rake to spit ``don't know how to build task`` error. + +And an example to disable the 'special_dashboard' feature for organization 'cartodb' would be: + +``bundle exec rake cartodb:features:disable_feature_for_organization["special_dashboard","cartodb"]`` + + +Adding a feature flag +--------------------- + +Adding feature flags should be done using the rake task called ``add_feature flag``. This rake task only takes one argument: + +* **Feature name** is the name of the feature flag to be created. + +This task is executed like: + +``bundle exec rake cartodb:features:add_feature flag[]`` + +And an example to create a feature flag named "special_dashboard" would be: + +``bundle exec rake cartodb:features:add_feature flag["special_dashboard"]`` + + +Removing a feature flag +----------------------- + +Removing feature flags should be done using the rake task called ``remove_feature flag``. This rake task only takes one argument: + +* **Feature name** is the name of the feature flag to be removed. + +This task is executed like: + +``bundle exec rake cartodb:features:remove_feature flag[]`` + +And an example to remove a feature flag named "special_dashboard" would be: + +``bundle exec rake cartodb:features:remove_feature flag["special_dashboard"]`` + + +Listing all feature flags +------------------------- + +All existing feature flags can be listed using the rake task called ``list_all_features``. + +This task is executed like: + +``bundle exec rake cartodb:features:list_all_features`` + + + + diff --git a/doc/manual/source/operations/create_orgs.rst b/doc/manual/source/operations/create_orgs.rst new file mode 100644 index 000000000000..670facd2002d --- /dev/null +++ b/doc/manual/source/operations/create_orgs.rst @@ -0,0 +1,16 @@ +Creating organizations +====================== + +To create a new organization, a rake task called ``create_new_organization_with_owner`` is used. For this task to work properly, a user **created beforehand** must be provided as an owner (if you're not sure how to create a user, refer to "Creating Users"). + +In order to create the organization, 4 parameters must be set: + +* **Organization name** is a short nickname for the organization, that may only contain letters, numbers and dash (-) characters. For example, 'cartodb' would be OK. +* **Organization display name** is a longer, more beautiful name for the organization. It may contain any characters needed. For example, 'CartoDB Inc.'. +* **Organization seats** is the number of users that will be able to be created under the organization. For example, 5 seats will mean that a maximum of 5 users can belong to the organization. +* **Organization quota** is the space quota in **bytes** that the organization is assigned. For example, 1024 * 1024 * 1024 is 1GB of quota. +* **Owner's user name** is the user name of the owner of the organization. In our example, let's assume that our user name is 'manolo'. + +Taking into account the previous information, creating an organization owned by 'manolo', named 'CartoDB Inc.', referred to as 'cartodb', with 5 seats and a 1GB quota, is just running the following command: + +``bundle exec rake cartodb:db:create_new_organization_with_owner ORGANIZATION_NAME="cartodb" ORGANIZATION_DISPLAY_NAME="CartoDB Inc." ORGANIZATION_SEATS="5" ORGANIZATION_QUOTA="1073741824" USERNAME="manolo"`` diff --git a/doc/manual/source/operations/create_users.rst b/doc/manual/source/operations/create_users.rst new file mode 100644 index 000000000000..db8182f94f0a --- /dev/null +++ b/doc/manual/source/operations/create_users.rst @@ -0,0 +1,14 @@ +Creating users +============== + +Creating users in CartoDB is simple thanks to the ``create_dev_user`` script located in ``scripts/create_dev_user``. To execute this script, be sure to be located at the cartodb repository root directory and simply run: + +``./script/create_dev_user`` + +You will be prompted to input 3 parameters: + +* **subdomain** is the same as "username". This is what you will enter in the browser to access the user's dashboard: ``https://username.cartodb.com``. Set it to whatever you want the user's user name to be. +* **password** this is the password the new user will use to login into their account. +* **admin password** this password will be an admin password for the newly created users. + +Upon script completion, the new user will have been created. \ No newline at end of file