Using the Oracle Developer Tools for Visual Studio

This topic shows how to use the Oracle Developer Tools for Visual Studio's Deployment wizard to deploy a web application to Oracle Cloud Infrastructure Container Engine for Kubernetes.

This topic shows how to use the Oracle Developer Tools for Visual Studio's Deployment wizard to deploy a web application to Oracle Cloud Infrastructure Container Engine for Kubernetes.

Note

The Oracle Developer Tools for Visual Studio has additional functionality that is not covered in this document. For more information, see Oracle Developer Tools for Visual Studio.

Overview

Using the Oracle Developer Tools for Visual Studio assumes you've already created a docker image for your application. This workflow generally looks like this:

Deploy an Application Using the Oracle Deployment Wizard

  1. From the Visual Studio Extensions menu, select Oracle Cloud App Deployment -> Deploy to Oracle Cloud. The Oracle Deployment Wizard displays.
  2. Click Next.
  3. Select an Authentication Profile (make sure that this profile matches the OCI CLI profile) and click Next.
  4. Select a deployment option:
    1. Redeploy using an existing deployment configuration: This deployment choice should be used for re-deployment of a web application when there are no deployment configuration changes. If the developer needs to make changes only to his/her web application and then re-deploy, they can do so using this option. This option allows developers to do quick deployment in a few clicks with no new information asked for.
    2. Redeploy with a different deployment configuration: This deployment choice should be used for re-deployment of a web application when there are deployment configuration changes. Scenarios where this is an appropriate choice include deploying on a different cluster, using a different Docker image, or a change in the Kubernetes configuration.
      Note

      If selecting a different cluster during re-deployment, delete the Kubernetes resources for your previous deployment using the "kubectl delete" command.
    3. Create a new deployment: Use this option when deploying your web application for the first time using this wizard. The name for this deployment should be unique, must be no longer than 63 characters, must start and end with a lowercase letter or number, and may contain lowercase letters, numbers, and hyphens.
  5. On the Select A Cluster panel, select an existing Kubernetes cluster from any of the compartments in your tenancy (the wizard does not support creating a cluster, so you should create a cluster using the console first). Click Next.

  6. On the Specify Deployment Details panel, you can modify existing deployment details.
    Note

    The deployment file created by the wizard can be modified in any editor and used for re-deployments using the wizard.
    1. Select a Docker image from the drop-down list.

    2. Select a Kubernetes Secret Name from the drop-down list.
  7. Click Next.
  8. Verify your deployment details, and then click Deploy.The window will actively update with the deployment status as it progresses. You can dismiss this dialog and check the deployment status later by selecting Oracle Cloud App Deployment -> Check Deployment Status from the Visual Studio menu.

Deleting A Deployment

The wizard doesn't support deleting a deployment using the Visual Studio IDE. To delete a deployment:

  1. Delete the deployment from the OKE cluster using the following command: kubectl delete -f <path-to-deployment-file> --kubeconfig <path-to-kubeconfig-file> If the deployment file is not present, you can use the following command: kubectl delete deploy/<deployment_name> svc/<service_name>
  2. Delete the folder in ~/.oci/visualstudiowebapps/<your-application-deployment-name> from the client machine.