Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Provisioning deploys code (in a C3 package) onto a C3 Tenant and Tagtenant and tag on the C3 Cluster. At a high level, a C3 package is defined as a specific set of files and directories defining the Types, configuration, runtimes, and initial data for the C3 deployment. Once a package is provisioned to a C3 Tenanttenant/Tagtag, users can access documentation, fetch typesTypes, evaluate metrics, and perform more advanced tasks such as training machine learning models or running batch jobs.

To provision code to a C3 tenant/tag , you first need to understand what exactly a C3 Package package is , and how it is structured. Generally speaking, C3 packages follow a specific directory structure (e.g., all .c3typ files are located in the src directory). C3 's AI official documentation on this matter is quite extensive: 

Please read C3's official guide and explanation on C3 package structure here: https://developer.c3.ai/docs/7.12.0/topic/deployment

Please read C3's official guide and explanation on Provisioning available here: https://developer.c3.ai/docs/7.12.17/topic/tools-console-provisioning

...

Provisioning Tutorial Video

Multimedia
nameProvisioning_Datalake_compress.mp4

Prerequisites

Please see the DTI Readiness Checklist to ensure you are ready to begin provisioning C3 packages. You must be able to access a C3 tenant and tag Cluster to complete any of the steps on this page.

...

COVID-19 Data Lake Provisioning

To deploy the COVID-19 Datalake Data Lake to your tenant/tag, please clone the base COVID-19 C3 package located here: https://github. com/c3aidti/dtiTraining Then, following either of the methods below, provision the 'baseCovidDatalake' package from the dtiTraining subdirectory.

Provisioning Tutorial Video

MultimedianameProvisioning_Datalake_compress.mp4



Provisioning Methods

There are two methods to provision a C3 package.:

  1. Via a web-based provisioner in a tenant/tag's static console.
  2. Via C3 .ai's AI command line interface (CLI), which enables developers to provision code without a web-browser.

Web Provisioner

After accessing your C3 tenant/tag , you should see a page like the following:

...

In the upper right hand corner, you will see a button featuring a cloud with an upward pointing arrow (Image Added).  Image Removed Clicking on it , opens C3's web-based provisioner.opens the provisioner tool:

Using this tool is very simple:

  1. Enter the name of your tenant in the textbox 'Tenant'.
  2. Enter the name of your tag in the textbox 'Tag'.
  3. Enter the name of your package in the textbox 'Package'.
  4. Click the 'Browse...' button and select the top-level directory of your C3 package (where the repository.json file is located).
  5. Click the 'Deploy' button which should become active once the previous steps are completed.
  6. Wait! Do not refresh your browser tab! Once provisioning is complete, your tab will respond again. Provisioning blocks the execution on that tab.

As an example, for the DTI training cluster, you will be assigned a Tag tag which will be related to your or your group's name. For example, professorX's group is assigned the tag 'professorX' on the tenant 'dti', so the 'Tenant' field should say 'dti', the 'Tag' field should say 'professorX'.

...

This "ActionError: MetadataPackage workflow doesn't exist" error described above means that the provisioner can't find the package 'datalakeasdfasdf' (Misspelled on purpose to demonstrate an error).

Command Line Provisioner

See Installing the C3 command line toolUse the c3 command line interface to provision code.

Before executing this command, navigate to the top-level directory of your C3 package source code. Then, run a form of the following command:

...

Replace all <values> above with the following:

  • tenant: The name of your tenant (e.g., dti).
  • tag: The name of your tag (e.g., bertsimas).
  • package: The name of your package (the 'name' field in your 'package.json' file).
  • vanity_url: The vanity url of your

...

  • tenant/tag (e.g., https://dti-berstimas.c3dti.ai).
  • package_directory: The path to the

...

  • directory containing the package you want to deploy. This directory should contain a 'repository.json' file.

...


  • The '-a <package_directory>' option can be left out, however if it is, the current directory is used

...

  • .

...

  • auth_token: A generated authentication token

...

  • . See below for details.

To generate an authentication token for your C3 package, execute one of the following commands:In your tenant/tag's Javascript static console:

Code Block
languagejs
// From static console
Authenticator.generateC3AuthToken()

...




Code Block
languagepy
# From a C3-connected Python Jupyter

...

Code Block
languagepy
 notebook
c3.Authenticator.generateC3AuthToken()

The '-E' argument is optional. If your package includes test data or typesTypes, -E tells the c3 command line provisioner C3 CLI to provision those types Types and data too.

Here's an example of a message in the command line interface , after a successful provision.:

Code Block
[dti/mkrafczyk] Created 2.56Kb ZIP of one package in 0.0s
[dti/mkrafczyk] Server Warnings:
{fileUrl:"meta://dtiTraining/repository.json",lineNum:0,colNum:0,severity:"WARNING",message:"Wrong server version, current version is: '7.12.13' but expected version matching: '7.12.0.10137'"}
{fileUrl:"meta://c3aiDataLake/repository.json",lineNum:0,colNum:0,severity:"WARNING",message:"Wrong server version, current version is: '7.12.13' but expected version matching: '7.12.0.10137'"}
....
....
{fileUrl:"meta://server/uiFramework/src/changeLog-uiFramework.c3doc",lineNum:3,colNum:0,severity:"WARNING",message:"Unknown documentation category 'Change Log'.",listenerType:"DocumentationTopicListener"}
{fileUrl:"meta://server/webdriverProtocol/src/changeLog-webdriverProtocol.c3doc",lineNum:3,colNum:0,severity:"WARNING",message:"Unknown documentation category 'Change Log'.",listenerType:"DocumentationTopicListener"}
[dti/mkrafczyk] Provisioning completed with some warnings (2020-08-19T17:05:13.116-05:00)
Time taken: 1m 34.145s
Finished

...

After Provisioning

  • If you're using the JavaScript static console to interact with your

...

  • package, refresh your browser tab

...

  • or execute the command 'c3ImportAll()'

...

  • . Once completed, all code in your tenant/tag (e.g.,

...

  • Types, metrics, seed data) should be updated to match your new

...

  • package.
  • If you're using

...

  • the C3 AI Jupyter service you may need to restart the Jupyter interface.
  • If you're connected to C3 AI Suite through a remove python or Jupyter session, you will need to re-run the cell which creates the

...

  • `c3` object.

...

Troubleshooting

Provisioning can fail for many reasons. We list here some common errors along with and how to fix them. If provisioning fails, C3 AI Suite will return your tenant/tag to its last working state.

...

ActionError: MetadataPackage workflow doesn't exist

This means , the provisioner can't find the package  package you specified. Ensure , the package name you give the provisioner matches the 'name' field of your 'package.json' file.