Knowledge Base

Topic: Developer
Configuration and Teardown Scripts

What is a Configuration Script? A configuration script in CONS3RT is a shell script or Windows PowerShell script that can perform automated actions as part of the deployment process. In CONS3RT, there are two types of configuration scripts: master and host. Master configuration scripts are attached to the master node of your scenario, whereas host configuration scripts can be attached to each host in your scenario (including the master node).
Jenkins Plugin

The CONS3RT Jenkins plugin provides users with the ability to create CONS3RT software assets as part of the Jenkins build. The plugin also allows for users to upload their asset, created as a function of their build, to a CONS3RT site. This allows for the creation of new assets or the update of existing assets as part of a CI pipeline. In addition to asset creation or update, users can also leverage the deployment run option in the post-build action section of the plugin to launch new deployment runs that leverage their newly updated asset(s).
Submission Service

Connecting your CONS3RT Project with an external provider using the CONS3RT Submission Service allows project members to push Assets and Container Images from CONS3RT to an external repository Setting up the CONS3RT Submission Service integration on a project requires a CONS3RT user account and is limited to owners of a CONS3RT project. Configuring the Submission Service Only a Project Owner can configure Submission Services for their project. If you’re not certain what your role is within a project, or don’t seem to have sufficient permissions, contact your Team Manager.
Using Python with the ReST API

Try pycons3rtapi for an easy way to get started using the ReST API with Python 2.7. Prerequisites We suggest using the requests package to make ReST API calls with python, and the requests_toolbelt package to assist in calls using large file uploads like asset imports. Use pip to install prerequisites: pip install requests pip install requests_toolbelt Use an ECA Certificate with python Once requests is installed, you can leverage it to add your client ECA certificate to API requests to CONS3RT.
Make ReST API Calls with an ECA Cert

Set up Your Account to make ReST API Calls You can make ReST API calls using your Username, ECA certificate, and an API token To find your Username, click on the Profile Icon on the top-right, and select Profile & Account Click here for information on obtaining an ECA Certificate Register your ECA Certificate or Add an ECA Certificate to you existing Account Create an API Token Sample ReST API Calls on Linux In order to make ReST API calls on Linux, you may need to convert your ECA certificate (p12 or pfx file) to a PEM file with a private key.
API Tokens

An API token is needed to access the CONS3RT REST API on a per project basis. To create an API token: Generate a Project API Token Click on the person icon in the top right corner and select the “Profile & Account” option from the dropdown menu. Select Security and scroll down to API Tokens Click the Generate Token button next to the desired project. The token will appear and you will also receive a confirmation email.