copyright | lastupdated | keywords | subcollection | ||
---|---|---|---|---|---|
|
2024-11-01 |
watsonx-code-assistant |
{{site.data.keyword.attribute-definition-list}}
{: #cloud-setup-z}
[{{site.data.keyword.wcaz_short}}]{: tag-dark-teal}
Set up your {{site.data.keyword.cloud_notm}} service instance of {{site.data.keyword.wcaz_short}} so you can use it with your full installation of the product. {: shortdesc}
{: #prereqs-z}
-
Make sure that you have an {{site.data.keyword.cloud_notm}} account{: external}.
-
Provision an instance of {{site.data.keyword.wca_short}} through the {{site.data.keyword.cloud_notm}} catalog{: external} page or by working with an IBM sales representative.
-
Download the
IBM watsonx Code Assistant for Z 2.0 Multiplatform Multilingual eAssembly
from IBM Passport Advantage{: external}.
When you finish provisioning your instance, click Setup to open an onboarding checklist page to help you configure the instance. Or, you can select Administration and then Setup to access this onboarding checklist.
Items in that checklist correspond to each of the following steps. Click the action arrows on the checklist page that are associated with each item to complete the steps.
{: #apikey}
You can use this API key later to enable Visual Studio Code to communicate with {{site.data.keyword.wca_short}}.
-
On the Service IDs{: external} page, click Create.
-
Enter
{{site.data.keyword.wca_full_notm}} user
as the name for your service ID. Optionally, enter a description. -
Click Create.
You are redirected to the dashboard for your service ID, which includes tabs for Access and API keys.
-
Click the API Keys tab.
-
Click Create.
-
Enter
{{site.data.keyword.wca_full_notm}} API key
as the name for your API key. Optionally, enter a description. -
Click Create.
-
Click Download or Copy and store the API key in a safe location.
The key is only available for 296 seconds. Make sure to store it somewhere you can find it later. {: important}
Although {{site.data.keyword.wca_short}} supports allowing multiple users to share the API key for the Service ID, the best practice is for each user to have their own API key. For more information about adding users to your instance, see Managing IAM access for {{site.data.keyword.wcaz_short}}.
{: #deploy_space-z}
The deployment space is the serving environment for {{site.data.keyword.wca_short}}.
-
In your {{site.data.keyword.wca_short}} instance, click the Navigation Menu icon , then select Deployments.
-
Click New deployment space.
-
Enter
Code Assistant
as the name for your deployment space. Optionally, enter a description. -
In Code assistant service, select your instance.
-
Click Create.
-
A status window appears. After the space is created, click Close.
{: #space_collab_z}
Enable the API to connect to your deployment space.
-
On the Manage tab of your deployment space, click Access control.
-
Click Add collaborators and select Add service IDs from the menu.
A list of service IDs that are associated with your account appears.
-
Click the checkbox for the {{site.data.keyword.wca_full_notm}} user service ID that you created, and select Editor for the role.
-
Click Add.
The service ID is added to the list of collaborators.
{: #db2}
{{site.data.keyword.wcaz_short_cap}} uses Db2 to store code input and output. If you don't already have an instance of Db2, {{site.data.keyword.cloud_notm}} can help you create one that is optimized for {{site.data.keyword.wcaz_short}}.
-
Select a region from the list of available regions.
-
Review the preselected Db2 pricing plan.
-
Click Create.
{: #your_space}
Enable the deployment space to send and retrieve code from Db2 storage.
-
On the Assets tab of your deployment space, click Import assets.
-
Click Data access, then click Connection.
-
In Add connection, select the IBM DB2 on Cloud connector, then click Next.
-
Click the Select instance button.
-
In Select service, select your Db2 service instance, and then click Select.
Information from your service instance is added to the connection overview, details, credentials, and certificates.
-
Click Create.
If you did not set a location and sovereignty, a window appears where you can confirm that you want to create the connection without setting these values. To accept, click Create. If you need to set the values, click Cancel and select Location and sovereignty.
If your database is on another {{site.data.keyword.cloud_notm}} account, or if the automated population fails, see Why can't I connect {{site.data.keyword.wcaz_short}} to my Db2 database?.
{: #db2-configure}
After {{site.data.keyword.wcaz_short}} is set up in {{site.data.keyword.cloud_notm}}, the Db2 administrator needs to configure the database by loading the provided script.
To locate the script files:
-
Use IBM Passport Advantage{: external} to download either:
- The complete
IBM watsonx Code Assistant for Z 2.0 Multiplatform Multilingual eAssembly
- Or the individual image
IBM watsonx Code Assistant Developer Tools 2.0 Multilingual
- The complete
-
Open the
IBM watsonx Code Assistant Developer Tools 2.0 Multilingual
image.(The compressed file name is
IwCAfZ2e0_2.0_ML.zip
.) -
In the
IBM watsonx Code Assistant Developer Tools 2.0 Multilingual
folder, open the compressed filewatsonx_Code_Assistant-for_Z-2.0.0.zip
. -
Locate these files in the
watsonx_Code_Assistant-for_Z-2.0.0
folder:adscan_DB2oC_CreateObjects.sql
adscan_DB2oC_DeleteObjects.sql
To configure Db2:
-
In the {{site.data.keyword.Db2_on_Cloud_short}} console, click the Run SQL icon.
-
Click the plus (+) tab to add a script.
-
If you already have an initialized database from a previous version of {{site.data.keyword.wcaz_short}}, you need first clean up the old database. Click From file and browse to select
adscan_DB2oC_DeleteObjects.sql
, then click Run all to delete the schema and tables.The
adscan_DB2oC_DeleteObjects.sql
script is a sample. Depending on the state of the database, more or fewer steps might be required to completely reset the database. Contact your Db2 Administrator for assistance when you run the script. {: note} -
To initialize a new database, click From file and browse to select
adscan_DB2oC_CreateObjects.sql
. -
Click Run all to create the schema and tables.
{: #next_steps_z}
You deployed and connected your {{site.data.keyword.cloud_notm}} components to your provisioned {{site.data.keyword.wca_short}} instance. You're ready to take your next steps and integrate with your IBM Z Open Editor in Visual Studio Code. For information, see Set up a development environment{: external}.