|
This is legacy documentation
CloudBees Feature Management is now part of CloudBees Unify. For current feature management documentation, go to CloudBees Unify Feature management. This documentation covers the original CloudBees Feature Management product (formerly Rollout.io), which is end-of-life. It remains available only for existing customers who are migrating to CloudBees Unify. |
|
Support during the extension period
Because CloudBees Feature Management is an end-of-life product, support during the extension period is limited to critical items only:
This coverage is consistent with the CloudBees end-of-life policy in the support Terms & Conditions. |
This section describes how to set up and install the C/C++ SDK and how to deploy a feature flag.
Step 1 - Setting up the C/C++ SDK
To setup the C/C++ SDK, follow these steps:
-
Create a CloudBees Feature Management account. See Signup Page to create an account.
-
Get your environment key. Copy your environment key from App settings > Environments > Key.
Step 2 - Installing the C/C++ SDK
-
For instructions on installing the C/C++ package in your application, select your operating system:
Linux or macOS
-
Install the prerequisites:
LinuxmacOS$ apt-get install cmake gcc git$ brew install cmake gcc git -
Clone the Rox C SDK Repository at the root of the workspace directory.
$ git clone https://github.com/rollout/rox-c.git -
Run the installation script. This will install the SDK to the subdirectory specified in the command. If the optional
-pparameter is omitted, the installation will require superuser privileges, and the SDK will be installed at/usr/local/rollout-sdk.$ cd rox-c && ./install.sh -C -d /path/to/install/dir
Windows
-
To make sure the OpenSSL and Curl libraries can be built on Windows, install the following and ensure the executables are added to
PATH:-
Strawberry Perl (http://strawberryperl.com/)
-
NASM (https://www.nasm.us/)
-
CMake 3.9 or higher
-
Visual Studio with C Compiler tools installed
-
Git
-
-
Open Cross Tools Command Prompot for VS.
-
Clone the repository:
> git clone https://github.com/rollout/ -
Navigate to the repository root folder.
-
Install the SDK to the desired
%INSTALLATION_PATH%. If omitted, the SDK will require Administrator permissions, to install atC:\Program Files\rollout-sdk.> install %INSTALLATION_PATH% -
(OPTIONAL) add
%INSTALLATION_PATH%\binto systemPATHvariable.
Add the following lines of code to your application
#include <rox/server.h> #include <stdio.h> #define DEFAULT_API_KEY <CBFF_ENV_KEY> #define DEFAULT_DEV_MODE_KEY "null" int main(int argc, char **argv) { RoxStringBase *demo_flag = rox_add_flag("demo.demoFlag", false); RoxOptions *options = rox_options_create(); rox_options_set_dev_mode_key(options, DEFAULT_DEV_MODE_KEY); rox_setup(DEFAULT_API_KEY, options); char c = 'Y'; while (c != 'n' && c != 'N') { printf("Demo flag is %s\n", rox_flag_is_enabled(demo_flag) ? "ON" : "OFF"); printf("Continue? (Y/n):"); c = fgetc(stdin); if ((c == '\n' || c == EOF)) { // Enter key pressed c = 'Y'; } else { getchar(); // read dummy character to clear input buffer, which inserts after character input } printf("\n"); } rox_shutdown(); return 0; }
#include <roxx/server.h> #include <cstdio> #define DEFAULT_API_KEY <CBFF_ENV_KEY> #define DEFAULT_DEV_MODE_KEY "null" int main(int argc, char **argv) { Rox::Flag *demoFlag = Rox::Flag::Create("demo.demoFlag", false); Rox::Options *options = Rox::OptionsBuilder() .SetDevModeKey(DEFAULT_DEV_MODE_KEY) .Build(); Rox::Setup(DEFAULT_API_KEY, options); char c = 'Y'; while (c != 'n' && c != 'N') { printf("Demo flag is %s\n", demoFlag->IsEnabled() ? "ON" : "OFF"); printf("Continue? (Y/n):"); c = fgetc(stdin); if ((c == '\n' || c == EOF)) { // Enter key pressed c = 'Y'; } else { getchar(); // read dummy character to clear input buffer, which inserts after character input } printf("\n"); } Rox::Shutdown(); return 0; }
|
Container class registration and environment key setup
|