Code Monkey home page Code Monkey logo

vscode-azurecontainerapps's Introduction

Azure Container Apps for Visual Studio Code

Version Installs Build Status

Use the Azure Containers extension to quickly create and deploy containerized apps directly from VS Code. Check out the Azure Samples repository to view sample projects.

Sign up today for your free Azure account and receive 12 months of free popular services, $200 free credit and 25+ always free services πŸ‘‰ Start Free.

Create your first container app

Use the Deploy Project from Workspace... command to simplify the process of deploying a local workspace project to a container app! By analyzing your project directory, we automatically detect any Dockerfiles and generate all the necessary Azure resources required for creating a containerized application (monorepo support now included!).

Please follow our onboarding walkthrough to get started. You can access the walkthrough using either of the following methods:

  • Click the workspace container apps icon and run Open Walkthrough

  • Open through the command palette F1 > Azure Container Apps: Open Walkthrough

You can re-run the command with your saved workspace settings to quickly re-deploy your project to any previously saved Azure resources.

Note: We also have entry-points on the container apps environment item (Create Container App from Workspace) and the container app item (Deploy Workspace to Container App). These commands offer an alternative way to quickly target project deployment to existing resources.

Edit and deploy your app

Draft support has only been added for these actions: Scaling commands, Update Container Image..., Edit Container App (Advanced)

  1. Make a supported edit to your container app. In this example we will be editing the scaling range.

  2. Changes made to your container app will be reflected by the appended "*" and the "Unsaved changes" tag added to the container app

    unsavedChanges

  3. More changes can be made and deployed together!

  4. Deploy these changes to your container app by clicking the cloud icon located next to your container app

    deployDraft

  5. Once your deployment has completed your changes should accurately be reflected in the Azure view!

Contributing

There are a couple of ways you can contribute to this repo:

  • Ideas, feature requests and bugs: We are open to all ideas and we want to get rid of bugs! Use the Issues section to either report a new issue, provide your ideas or contribute to existing threads.
  • Documentation: Found a typo or strangely worded sentences? Submit a PR!
  • Code: Contribute bug fixes, features or design changes:
    • Clone the repository locally and open in VS Code.
    • Run "Extensions: Show Recommended Extensions" from the command palette and install all extensions listed under "Workspace Recommendations"
    • Open the terminal (press CTRL+ `) and run npm install.
    • To build, press F1 and type in Tasks: Run Build Task.
    • Debug: press F5 to start debugging the extension.

Legal

Before we can accept your pull request you will need to sign a Contribution License Agreement. All you need to do is to submit a pull request, then the PR will get appropriately labelled (e.g. cla-required, cla-norequired, cla-signed, cla-already-signed). If you already signed the agreement we will continue with reviewing the PR, otherwise system will tell you how you can sign the CLA. Once you sign the CLA all future PR's will be labeled as cla-signed.

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Telemetry

VS Code collects usage data and sends it to Microsoft to help improve our products and services. Read our privacy statement to learn more. If you don’t wish to send usage data to Microsoft, you can set the telemetry.enableTelemetry setting to false. Learn more in our FAQ.

Lifecycle

The Azure Container Apps extension for VS Code follows the Modern Lifecycle Policy. Follow instructions here to get the latest updates of the extension.

License

MIT

vscode-azurecontainerapps's People

Contributors

alexweininger avatar bwateratmsft avatar dependabot[bot] avatar github-actions[bot] avatar microfish91 avatar microsoft-github-operations[bot] avatar microsoftopensource avatar motm32 avatar nturinski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vscode-azurecontainerapps's Issues

Image not scaling well

Here is what the extension image looks like on my machine.I tried with different monitors at different resolution and scale percentages, always looks the same.

image

The Dapr icon is hard to see in Dark theme

OS: All
Build Version: 20220405.6
Regression: Not a regression

Repro Steps:

  1. Set the VS Code to Dark theme.
  2. Expand one container app.
  3. Check whether the Dapr icon is easy to see or not.

Expect:
The Dapr icon is easy to see.

Actual:
The Dapr icon is hard to see.
image

MVP

New release date is 01/11/2022
Bug bash the Wednesday before 01/05/2022

  • πŸƒ JavaScript SDK @fiveisprime
  • Explorer listing environments and apps within the environment
  • CRUD environments
  • CRUD apps
  • Configure image for app
  • Configure ports for app
  • View container logs (this will be powered by Log Analytics so open in portal)
  • README walkthrough @fiveisprime

The Container Apps extension needs to take a dependency on the Docker extension for the following commands (may need to work with Brandon to create a proper API where it doesn't exist today).

  • Create Dockerfile
  • Build image (can be done using tasks.json)
  • Push image to registry

There is no Container Apps option in the list after clicking "Report Issue"

OS: All
Build Version: 20220405.6
Regression: Not a regression

Repro Steps:

  1. Ensure the Azure Container Apps extension is installed.
  2. Navigate to Azure view -> Expand HELP AND FEEDBACK node -> Click "Report Issue".
  3. Check whether there is the Container Apps option in the list.

Expect:
There is the Container Apps option in the list.

Actual:
There is no Container Apps option in the list.
image

More Info:
This issue also reproduces for "Review Issue".

The container app doesn't disappear automatically after deleting it

OS: All
Build Version: 20220405.6
Regression: Not a regression

Repro Steps:

  1. Right click a container app -> Click "Delete Container App...".
  2. Check whether the container app disappears automatically after deleting it.

Expect:
The container app disappears automatically after deleting it.

Actual:
The container app doesn't disappear automatically after deleting it.

More Info:

  1. The "Ingress" node also doesn't auto-refresh after enabling it.
    image
  2. Refresh can fix this issue.

Add ability to drill down into replicas/containers

This is needed for attaching log stream and connecting a console, as they both need to select the replica to use.

Replicas return this information:

{
    "id": "/subscriptions/.../resourceGroups/.../providers/Microsoft.App/containerApps/.../revisions/antchu-test--144079l/replicas/antchu-test--144079l-7b754df4fd-cb8hf",
    "name": "antchu-test--144079l-7b754df4fd-cb8hf",
    "properties": {
        "containers": [
            {
                "containerId": "containerd://4312e8a562c10fcdf8820caa28ee981c19ecc46eba145460035550319bd081f7",
                "name": "antchu-test",
                "ready": true,
                "restartCount": 0,
                "started": true
            },
            //...
        ],
        "createdTime": "2022-03-14T04:51:15Z"
    },
    "type": "Microsoft.Web/containerapps/revisions/replicas"
}

Need to see if replicas have an overall status or other interesting info to display, so that the user can figure out what replica to connect to and diagnose. Otherwise maybe find a way to display details from containers. Note that some system sidecar containers might appear. Need to understand if we can/should filter them out.

The log stream and console commands might actually need to specify a container, not just a replica.

Fail to execute command "Azure Container Apps: Activate" with an error from command palette

OS: All
Build Version: 20220405.6
Regression: Not a Regression

Repro Steps:

  1. F1 -> Azure Container Apps: Activate -> Select a subscription -> Select a container app environment -> Select a container app -> Select a revision.
  2. Check whether succeeds to execute command "Azure Container Apps: Activate" directly.

Expect:
Succeed to execute command "Azure Container Apps: Activate" directly.

Actual:
Continue to perform the next step and fail to execute command "Azure Container Apps: Activate" with an error.
Screen Shot 2022-04-06 at 14 16 23

More Info:
This issue also reproduces for the commands "Azure Container Apps: Deactivate" and "Azure Container Apps: Restart".

Update name validation

Check that environment and container app name validation matches the actual validation done by the service. For instance, VS Code has a 20 char max but the service doesn't appear to have the same issue.

The validation prompt is confusing that "cannot have '--'" means the container app environment name doesn't contain '--' or the name doesn't end with '--'

OS: All
Build Version: 20220405.6
Regression: Not a regression

Repro Steps:

  1. F1 -> Azure Container Apps: Create Container App Environment... -> Type "nicole--" as the name.
  2. Check whether the validation prompt is clear.

Expect:
The validation prompt is clear.

Actual:
The validation prompt is confusing that "cannot have '--'" means the container app environment name doesn't contain '--' or the name doesn't end with '--'.
image

More Info:
There is no validation prompt when creating a container app environment with name "nicole--123" and succeed to create a container app environment with name "nicole--123".

Fail to create a container app environment with name "ni"

OS: All
Build Version: 20220405.6
Regression: Not a regression

Repro Steps:

  1. F1 -> Azure Container Apps: Create Container App Environment... -> Type "ni" as the name.
  2. Check whether succeeds to create a container app environment with name "ni".

Expect:
Succeed to create a container app environment with name "ni".

Actual:
Fail to create a container app environment with name "ni".
image

Dapr implementation

Dapr has been moved from the container apps to the managed environments. Have to figure out what that means for how we display Dapr stuff in the extension (especially if we're leaning towards removing environments from the UI)

No prompt information pops up when typing an existing container app environment name

OS: All
Build Version: 20220405.6
Regression: Not a Regression

Repro Steps:

  1. Create a container app environment with a location.
  2. Create a container app environment with the same name and different location again.
  3. Check whether pops up a prompt information.

Expect:
Pop up a prompt information.

Actual:
No prompt information pops up.
Screen Shot 2022-04-06 at 18 22 02

More Info:
Fail to create a container app environment with the an existing name and different location.
Details of output:

1:44:50 PM: Using existing resource group "test".
1:44:51 PM: Creating new Log Analytic workspace...
1:44:53 PM: Creating new Container App environment "test"...
1:44:56 PM: Error: The resource 'test' already exists in location 'westeurope' in resource group 'test'. A resource with the same name cannot be created in location 'eastus'. Please select a new resource name.

Support other anonymous registries

Support registries other than Docker Hub and ACR.

  • Allow freeform entry of container image name (supports anonymous images from non-Docker Hub registries like MCR)
  • Ideally the next time we update the app, the image is defaulted to the previous value

Error creating new Container App

Repro Steps

  • Right clicked on my new CA env I just created and selected 'Create Container App...'
  • Name - 'first-app'
  • Cont Reg - ACR - 'mikemortACR'
  • Repository - 'orderproc'
  • Tag = '3.0'
  • HTTP endpoint - 'Enable'
  • Traffic - 'External'
  • Port - '80'

Received the following error...
Error: The following field(s) are either invalid or missing. Invalid value: "orderproc-3.0": Invalid Name: Per RFC 1123 name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character (e.g. 'my-name', or '123-abc', regex used for validation is 'a-z0-9?'): template.containers.

I tried a few other attempts, the pattern I see is it fails if the tag I select is something like 3.0 or 2.2. If I select a tag without a period in it, it works.

There is no command "+ Create new registry..." in the command list when asking to select an azure container registry

OS: All
Build Version: 20220405.6
Regression: Not a Regression

Repro Steps:

  1. Right click a container app environment -> Create Container App -> Type a name -> Select "Azure Container Registries".
  2. Check whether there is a command "+ Create new registry..." in the command list.

Expect:
There is a command "+ Create new registry..." in the command list.

Actual:
There is no command "+ Create new registry..." in the command list.
Screen Shot 2022-04-06 at 18 36 21

Fail to create a container app which has a Windows image in it

OS: All
Build Version: 20220405.6
Regression: Not a regression

Repro Steps:

  1. F1 -> Azure Container Apps: Create Container App... -> Select one Container App environment -> Enter a container app name -> Select a container registry -> Select a repository which has a Windows image in it -> Select the next items to create the container app.
  2. Check whether succeeds to create a container app or not.

Expect:
Succeed to create a container app which has a Windows image in it.

Actual:
Fail to create a container app which has a Windows image in it.
image

More Info:
This issue does not reproduce when creating a container app with Linux image in it.

Only the "maxReplicase" property shows in the opened Scaling.json file

OS: All
Build Version: 20220405.6
Regression: Not a regression

Repro Steps:

  1. Expand one container app -> Right click "Scaling" node -> Select "View Properties".
  2. Check whether all properties show in the opened Scaling.json file or not.

Expect:
All properties show in the opened Scaling.json file.
image

Actual:
Only the "maxReplicase" property shows in the opened Scaling.json file.
image

"Resource not found" shows in portal after clicking the "Logs" node

OS: All
Build Version: 20220405.6
Regression: Not a regression

Repro Steps:

  1. Create a container app.
  2. Click "Logs" node in this container app.
  3. Check whether opens the log in portal or not.

Expect:
Open the log in portal successfully.

Actual:
"Resource not found" shows in portal.
image

The error is not clear when creating a second container app environment with the same location

OS: All
Build Version: 20220405.6
Regression: Not a regression

Repro Steps:

  1. Create a container app environment with a location, such as "East US".
  2. Create a new container app environment with the location "East US" again, an error occurs when creating the second container app environment with the location "East US".
  3. Check whether the error is clear or not.

Expect:
The error is clear, such as "There is only one environment can be created in one location...".

Actual:
The error is not clear.
image

More Info:
The new container app environment with other locations can be created successfully.

There is a ".." not "..." next to "Enable Ingress for Container App.." action in context menu

OS: All
Build Version: 20220405.6
Regression: Not a regression

Repro Steps:

  1. Expand one container app and right click "Ingress" node -> Disable "Disable Ingress for Container App".
  2. Right click "Ingress" node.
  3. Check whether there is a "..." next to "Enable Ingress for Container App..." action in context menu or not.

Expect:
There is a "..." next to "Enable Ingress for Container App..." action in context menu.

Actual:
There is a ".." not "..." next to "Enable Ingress for Container App.." action in context menu.
image

Browse button does nothing

After creating a new container app successfully, the following message with a 'Browse' button is displayed. Clicking the 'Browse' button does nothing.

image

It would be better to add a log "Successfully created new Log Analytic workspace..." when creating a container app environment

OS: All
Build Version: 20220405.6
Regression: Not a regression

Repro Steps:

  1. Create a container app environment.
  2. Check whether there is a log "Successfully created new Log Analytic workspace..." or not.

Expect:
There is a log "Successfully created new Log Analytic workspace..." when creating a container app environment.

Actual:
There is no log "Successfully created new Log Analytic workspace..." when creating a container app environment.
image

More Info:
There is only one creating log "Creating new Log Analytic workspace...".

There is no "..." next to "Switch Ingress Visibility" action in the context menu

OS: All
Build Version: 20220405.6
Regression: Not a regression

Repro Steps:

  1. Expand one container app and right click "Ingress" node.
  2. Check whether there is a "..." next to "Switch Ingress Visibility" action in context menu or not.

Expect:
There is a "..." next to "Switch Ingress Visibility" action in context menu.

Actual:
There is no "..." next to "Switch Ingress Visibility" action in context menu.
image

There is no command "Open in Portal" in the context menu of the container app environment

OS: All
Build Version: 20220405.6
Regression: Not a regression

Repro Steps:

  1. F1 -> Azure Container Apps: Open in Portal -> Select a subscription -> Select a container app environment -> Open the container app environment in portal.
    image
  2. Right click the container app environment.
  3. Check whether there is the command "Open in Portal" in the context menu.

Expect:
There is the command "Open in Portal" in the context menu.

Actual:
There is no command "Open in Portal" in the context menu.
image

Connect a console to a container

Select a replica/container and connect a shell to it.

Need to track down the actual API. Have seen conflicting info about whether we need to specify the replica or a container in the replica to connect to. The Kubernetes exec API will select the default container if missing, so maybe it's optional here too.

Related #33 #30

Directly execute command "Azure Container Apps: Edit Target Port... " and pop up an error from command palette

OS: All
Build Version: 20220405.6
Regression: Not a Regression

Repro Steps:

  1. F1 -> Azure Container Apps: Edit Target Port... -> Select a subscription -> Select a container app environment -> Select a container app.
  2. Check whether continues to perform the next step of selecting the "Ingress".

Expect:
Continue to perform the next step of selecting the "Ingress".

Actual:
Directly execute command "Azure Container Apps: Edit Target Port... " and pop up an error.
Screen Shot 2022-04-06 at 14 16 23

More Info:
This issue also reproduces for the commands "Azure Container Apps: Switch Ingress Visibility", "Azure Container Apps: Disable Ingress for Container App" and "Azure Container Apps: Delete Container App Environment".

Deployment features when Docker is installed locally

If Docker is installed locally, it can add some complexity to the deployment process. Using this issue to discuss various points.

  • Should we support building an image locally instead of building in ACR? This might be needed to push to other registries.
  • Should we support selecting a local image to deploy? This would be similar to or leverage the Docker extension command for pushing an image.
  • If an image is local, there might be more info that can be inferred, such as the app's target port. Might be able to infer from the EXPOSE metadata in the image.

Support single revision mode by default

This should simplify things quite a bit.

VS is not only defaulting to single revision, it's going to force single revision mode. If an app is in multiple revisions mode, it prompts to change this setting before deploying. Should consider this for VS Code as well.

This would also simplify drilling down to replicas #33 and removing most revisions related commands such as activate/deactivate and traffic splitting.

Streamline environment creation

When deploying an app and an environment needs to be created, consider creating the environment and app together at the end of all the inputs. Currently, there's a wait for the environment to be created.

The environment is also not really that important compared to the app. Consider prompting for app info first. Then if this is a new app, ask for environment information. Default environment name from the app name.

Help user create a Dockerfile

If user runs deploy app command #40, give them an option to create a dockerfile if none exists. Guide them to the Docker extension create dockerfile command.

This can be tricky and there might not be a good success rate. Not sure if an optional walkthrough #39 fits in here, or include link to language-specific VS Code quickstarts.

Note that in the future, there might be ways to remotely build an image from source code without a dockerfile. In that case we might not need to help generate a dockerfile.

Support YAML intellisense

There are a few YAML files the CLI can take, including:

  • az containerapp create (a YAML representing the app)
  • az containerapp env dapr-component set (a YAML representing a dapr component)

Fail to create a container app which has a "Linux/arm64" image in it

OS: M1
Build Version: 20220405.6
Regression: Not a regression

Repro Steps:

  1. F1 -> Azure Container Apps: Create Container App... -> Select one Container App environment -> Enter a container app name -> Select a container registry -> Select a repository which has a Linux/arm64 image in it -> Select the next items to create the container app.
  2. Check whether succeeds to create a container app or not.

Expect:
Succeed to create a container app which has a Linux/arm64 image in it.

Actual:
Fail to create a container app which has a Linux/arm64 image in it.
Screen Shot 2022-04-06 at 13 58 06

It would be better to remove ".." from "Disable Ingress for Container App" action in context menu

OS: All
Build Version: 20220405.6
Regression: Not a regression

Repro Steps:

  1. Expand one container app and right click "Ingress" node.
  2. Check whether there is no ".." next to "Disable Ingress for Container App" action in context menu or not.

Expect:
There is no ".." next to "Disable Ingress for Container App" action in context menu.

Actual:
There is a ".." next to "Disable Ingress for Container App" action in context menu.
image

Add a deploy code to Container Apps command (with Dockerfile)

Same as deploy image, but allow selection of a dockerfile. Then use the ACR build command to build the image remotely in the registry.

Requires:

  • Docker extension
  • User is signed into Azure

Inputs:

  • Location of a dockerfile
  • Optionally, the docker build context (default to the folder of the dockerfile)
  • Select or create container registry
  • The image name and tag (the Docker extension defaults one based on the ACR build ID)
  • Select or create container app (if the Dockerfile has an EXPOSE command, assume app needs an ingress and use its value as the port)
  • Select or create container Apps environment

Consider saving this info in workspace settings to make it easier when deploying the app next time.

The traffic is "External" under the "Ingress" node after enabling it with "Internal" traffic selected

OS: All
Build Version: 20220405.6
Regression: Not a regression

Repro Steps:

  1. Execute "Disable Ingress for Container App" for "Ingress" node.
  2. Right click "Ingress" node and select "Enable Ingress for Container App..." -> Select "Intenal" traffic -> Enter a port.
  3. Refresh the container app.
  4. Check whether the traffic is "Intenal" under the "Ingress" node or not.

Expect:
The traffic is "Intenal" under the "Ingress" node.

Actual:
The traffic is "External" under the "Ingress" node.

Manage secrets

Perform CRUD on an app's secrets.

Need to think about how to reference those in environment variables though.

Not all tags are shown for a repo

  • Right click on existing app and select 'Deploy image to Container App'
  • Registry - 'ACR' - 'mikemortACR'
  • Repository - Choose one with multiple tags

Issue: Only most recent tag is shown - Should see 4 tags for this repo

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.