Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Enable Azure Dev CLI to deploy AKS-LZA #64

Open
7 tasks
mosabami opened this issue Apr 20, 2023 · 3 comments
Open
7 tasks

[FEATURE] Enable Azure Dev CLI to deploy AKS-LZA #64

mosabami opened this issue Apr 20, 2023 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@mosabami
Copy link
Collaborator

mosabami commented Apr 20, 2023

Is your feature request related to a problem? Please describe.
A well architect AKS environment can be complicated to build. Enter the AKS deployment helper! However how do we make various sample apps available to customers who want to try out AKS and want the quickest option possible?

Describe the solution you'd like
Azure dev CLI makes it easy and quick to get started on Azure rapidly and is developer focused. Leveraging it to enable customers create well architected AKS environment will get more customers using AKS quickly

Describe alternatives you've considered
Using the AKS deploy helper to create the environment. However the dev CLI option will be even simpler albert not as flexible. The dev CLI can also be used to create sample apps in various languages. We will begin with our javascript app

Additional context

⚠️ Start by reading this doc to understand how to make a repo azd compatible

we will be using the AKS construction project for the IaC and have the repo pulled in as a submodule.
Here are the required tasks:

  • Create a repository in Azure-Samples org that the deployment and application scripts will be created in
  • Use this repo as a guide to create the repo: https://github.com/azure-samples/todo-nodejs-mongo-aks. It includes all the folders required to make a repo Dev CLI enabled. According to this the new repo should have the following folders: .devcontainers, .github/workflows, assets (where the pictures in readme will go), src
  • Use the content of this folder to create the code that goes into the infra folder. the AKS-Construction repo should be reference as a submodule in this project. We need to have a main.bicep and a main.parameters.json file in the infra folder, how the rest of the folder is structured apart from that is up to you. Make your own main.bicep file in the infra folder that uses the aks-construction's main.bicep file by referencing it like i did in this project. The only difference being that instead of listing the parameters like i did in that file as a json object, put those parameters in a fresh main.parameters.json file. Use the same parameters i used in my json object. Here is an example of what the parameters file will look like
  • The src folder should have two folders in it. The mslearn-aks-workshop-ratings-api folder submodule to the ratings app api repo. The mslearn-aks-workshop-ratings-web folder should do the same but submodule to this repo
  • The .devcontainers folder should use the same as this folder. Make changes to the upstream project's .devcontainer folder if need be and copy it into the .devcontainer for this project
  • the .github/workflows folder should include this pipeline to deploy the infra and this pipeline to deploy the app. This second pipeline will need access to the yaml files in this folder so this repo will need to be cloned as a submodule. If dev cli only allows you to use 1 pipeline, use the first one and we can figure out how to add the second later
  • The project will also require an azure.yaml file as seen in the sample repo provided

After all these steps are completed we will then proceed to complete step 2 and 3 highlighted in this doc

@mosabami mosabami added the enhancement New feature or request label Apr 20, 2023
@mosabami mosabami self-assigned this Apr 20, 2023
@carmodyquinnms
Copy link

carmodyquinnms commented May 18, 2023

Will use https://github.com/Azure/AKS-Landing-Zone-Accelerator/blob/main/Scenarios/AKS-Secure-Baseline-PrivateCluster/Bicep/07-workload.md
to install the app.

Created repo in https://github.com/carmodyquinnms/AKS-Construction-azd
Gordon helped me with the git submodule (kudos!! Gordon was SOO helpful as always!)
Ran into an issue with the firewall in the submodule and had to switch to 0.9.14 branch of aks-construction with the commands provided by Gordon:

cd aks-construction
git checkout 0.9.14 # this has now been merged into master
cd ..
git add aks-construction
git commit -m "moved submodule to 0.9.14"
git push

Then the provisioning ran just fine.
Need to get with mosabami and find out what name I should use to move the repo to Azure presumably under https://github.com/azure-samples/

@mosabami
Copy link
Collaborator Author

mosabami commented Sep 26, 2024

Changing this issue to align with the product's new direction. We are going to be working out of the:
we will be using our new avm based bicep files to enable deploy with azd

  1. Create a new folder inside https://github.com/Azure/AKS-Landing-Zone-Accelerator/tree/main/Scenarios/AKS-Secure-Baseline-PrivateCluster/Bicep similar to the all-in-1 folder already existing there. this new folder can be called AZD-Deploy
  2. Configure the AZD to leverage https://github.com/Azure/AKS-Landing-Zone-Accelerator/blob/main/Scenarios/AKS-Secure-Baseline-PrivateCluster/Bicep/All-in-One-Bicep/main.bicep to deploy the azure resources but it should set the enablePrivateCluster parameter to false so it doesnt deploy a private cluster
  3. It should deploy the aks store demo using the yaml files available on the internet https://github.com/Azure-Samples/aks-store-demo/blob/main/aks-store-all-in-one.yaml

@mosabami
Copy link
Collaborator Author

mosabami commented Sep 26, 2024

Changing this issue to align with the product's new direction. We are going to be working out of the:
we will be using our new avm based bicep files to enable deploy with azd

Create a new folder inside https://github.com/Azure/AKS-Landing-Zone-Accelerator/tree/main/Scenarios/AKS-Secure-Baseline-PrivateCluster/Bicep similar to the all-in-1 folder already existing there. this new folder can be called AZD-Deploy
Configure the AZD to leverage https://github.com/Azure/AKS-Landing-Zone-Accelerator/blob/main/Scenarios/AKS-Secure-Baseline-PrivateCluster/Bicep/All-in-One-Bicep/main.bicep to deploy the azure resources but it should set the enablePrivateCluster parameter to false so it doesnt deploy a private cluster
It should deploy the aks store demo using the yaml files available on the internet https://github.com/Azure-Samples/aks-store-demo/blob/main/aks-store-all-in-one.yaml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants