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

Karenchen/enable draftv2 #4651

Merged
merged 78 commits into from
May 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
547441e
starting point
Mar 21, 2022
4aacf22
command makes call correctly. Need to reach out to DraftV2
Mar 22, 2022
6cd1e00
attempting to download binaries, but headers may be blocking
Mar 22, 2022
48ec4bc
Downloading binary, but it's not located in the correct path
Mar 24, 2022
a15212e
download into the correct directory works. Need to check existence of…
Mar 25, 2022
1eceebf
adding check to ensure download is correct for users os
Mar 25, 2022
6f775df
download and run binary
Mar 28, 2022
577a65a
fixing msg
Mar 29, 2022
cac9fc8
adding copywrite comment
Mar 30, 2022
275ea32
addressng PR comments, function naming conventions, etc.
Mar 30, 2022
29db02f
fixing copywrite typo
Mar 30, 2022
8b05aa4
The linter seems to be complaining about the List type hints. Resolvi…
Mar 31, 2022
6e9614c
fixing whitespace. The linter does not seem to like type annotations …
Mar 31, 2022
525652a
adding missing whitespaces after ,
Mar 31, 2022
c617cef
adding space before operatiors for linter
Mar 31, 2022
b6d5e0f
changing type hint import
Apr 1, 2022
b9e52b5
more whitespace
Apr 1, 2022
8a643e8
adding empty line
Apr 1, 2022
3d103b2
removing whitespace from blank linke
Apr 1, 2022
e7e9c93
adding disable too many lines
Apr 1, 2022
0ef773c
delting draftv2 dir
Apr 1, 2022
a52fedb
setup new branch
karenychen Apr 7, 2022
8cc6b05
refactoring
karenychen Apr 7, 2022
6ebaf5e
linked draftv2 create
karenychen Apr 7, 2022
448188f
clean up
karenychen Apr 7, 2022
c911b77
rediected stdout and stderr
karenychen Apr 7, 2022
f68643b
fixing style checks
karenychen Apr 7, 2022
1b872cf
resolved comments
karenychen Apr 9, 2022
61bdabf
resolved comments
karenychen Apr 9, 2022
e6ea3d0
fixed extra imports
karenychen Apr 9, 2022
daac6fc
added help menu
karenychen Apr 10, 2022
fd314e5
small fix
karenychen Apr 10, 2022
df31dbf
style fixes
karenychen Apr 10, 2022
2725913
Merge branch 'main' into karenchen/enable-draftv2
karenychen Apr 13, 2022
85fb982
fixes and added version check
karenychen Apr 13, 2022
cc16119
Merge branch 'karenchen/enable-draftv2' of github.com:karenychen/azur…
karenychen Apr 13, 2022
90e216b
quick revert
karenychen Apr 13, 2022
84e693a
quick revert
karenychen Apr 13, 2022
6433574
some refractoring
karenychen Apr 13, 2022
76644f3
renaming functions
karenychen Apr 13, 2022
a3eab7e
further refractor
karenychen Apr 13, 2022
3091bdc
quick fixes
karenychen Apr 13, 2022
dd5f2b7
more fixes
karenychen Apr 13, 2022
9738354
clean up import statements
karenychen Apr 13, 2022
d2febd1
change to use logging
karenychen Apr 18, 2022
dca6a1c
name change
karenychen Apr 18, 2022
fe44121
more renaming
karenychen Apr 18, 2022
bd06547
refractoring
karenychen Apr 18, 2022
c458df9
refractoring
karenychen Apr 18, 2022
93f3156
refractoring
karenychen Apr 18, 2022
d51b743
refractoring
karenychen Apr 18, 2022
bd4a8ef
quick fix
karenychen Apr 18, 2022
ce33eca
quick fix
karenychen Apr 19, 2022
5c355d9
remove debug msg
karenychen Apr 19, 2022
6f40dc2
fix version
karenychen Apr 19, 2022
1836550
Karenchen/enable-app-up-draftv2 (#1)
karenychen May 20, 2022
c6db3c1
Merge branch 'main' into karenchen/enable-draftv2
karenychen May 20, 2022
c40d9b1
retrigger checks
karenychen May 20, 2022
4247f00
Merge branch 'karenchen/enable-draftv2' of github.com:karenychen/azur…
karenychen May 20, 2022
c2e869a
added help and fixed tests
karenychen May 20, 2022
b97861c
changing tests
karenychen May 21, 2022
f8355d0
styling
karenychen May 21, 2022
86ad0ac
added auto download for draft binary
karenychen May 21, 2022
9807f52
small fixes
karenychen May 21, 2022
f7d6676
download logic fix
karenychen May 23, 2022
11baae4
fixing things
karenychen May 23, 2022
4ae096f
fixing tests
karenychen May 23, 2022
c80cda3
fixing tests
karenychen May 23, 2022
74fbf95
fixing recordings
karenychen May 23, 2022
eadc8ea
added examples in help menu
karenychen May 23, 2022
efe8c73
added help menu
karenychen May 23, 2022
0532e51
changing tests to live only
karenychen May 23, 2022
472e2af
fixing concurency tests
karenychen May 23, 2022
de30662
fixes mkdir issue
karenychen May 23, 2022
ecd10df
fixes mkdir issue
karenychen May 23, 2022
5abea0c
fixes mkdir issue
karenychen May 23, 2022
3e5a089
fixes mkdir issue
karenychen May 23, 2022
a6653e8
fixes download location
karenychen May 23, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/aks-preview/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ To release a new version, please select a new version number (usually plus 1 to
Pending
+++++++

0.5.72
++++++

* First public release for `az aks draft`

0.5.71
++++++

Expand Down
189 changes: 189 additions & 0 deletions src/aks-preview/azext_aks_preview/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -1704,3 +1704,192 @@
type: command
short-summary: Delete a nodepool snapshot.
"""

helps['aks draft'] = """
type: group
short-summary: Commands to build deployment files in a project directory and deploy to an AKS cluster.
"""

helps['aks draft create'] = """
type: command
short-summary: Generate a Dockerfile and the minimum required Kubernetes deployment files (helm, kustomize, manifests) for your project directory.
karenychen marked this conversation as resolved.
Show resolved Hide resolved
parameters:
- name: --destination
type: string
short-summary: Specify the path to the project directory (default is .).
- name: --app
type: string
short-summary: Specify the name of the helm release.
- name: --language
type: string
short-summary: Specify the language used to create the Kubernetes deployment.
- name: --create-config
type: string
short-summary: Specify the path to the configuration file.
- name: --dockerfile-only
type: bool
short-summary: Only generate Dockerfile for the Kubernetes deployment.
- name: --deployment-only
type: bool
short-summary: Only generate deployment files (helm, kustomize, manifests) for the Kubernetes deployment.
- name: --path
type: string
short-summary: Automatically download and use the Draft binary at the specified location.
examples:
- name: Prompt to generate a Dockerfile and deployment files in the current directory.
text: az aks draft create
- name: Generate only the Dockerfile in the current directory.
text: az aks draft create --dockerfile-only=true
- name: Generate only the deployment files in the current directory.
text: az aks draft create --deployment-only=true
- name: Generate a Dockerfile and an deployment file in a Java project with an app name at a specific project directory.
text: az aks draft create --language=java --app=some_app --destination=/projects/some_project
"""

helps['aks draft setup-gh'] = """
type: command
short-summary: Set up Github OIDC for your application
parameters:
- name: --app
type: string
short-summary: Specify the Azure Active Directory applicaton name.
- name: --subscription-id
type: string
short-summary: Specify the Azure subscription ID.
- name: --resource-group
type: string
short-summary: Specify the name of the Azure resource group.
- name: --provider
type: string
short-summary: Specify the cloud provider (default is azure).
- name: --gh-repo
type: string
short-summary: Specify the the github repository (organization/repo_name).
- name: --path
type: string
short-summary: Automatically download and use the Draft binary at the specified location.
examples:
- name: Prompt to setup the Github OIDC for a repository.
text: az aks draft setup-gh
- name: Setup the github OIDC on Azure for a specific repository.
text: az aks draft setup-gh --provider=azure --gh-repo=some_organization/some_repo
- name: Setup the github OIDC on Azure with subscription ID and resource group.
text: az aks draft setup-gh --provider=azure --subscription-id=some_subscription --resource-group=some_rg
- name: Setup the github OIDC with an application name on Azure with subscription ID and resource group for a specific repository.
text: az aks draft setup-gh --app=some_app --provider=azure --subscription-id=some_subscription --resource-group=some_rg --gh-repo=some_organization/some_repo
"""

helps['aks draft generate-workflow'] = """
type: command
short-summary: Generate a Github workflow for automatic build and deploy to AKS
long-summary: Before running this command, Make sure you have set up Github OIDC for your application.
You also need to create a resource group, a container registry and a Kubernetes cluster on Azure and
link the three resources using `az aks update -n <cluster-name> -g <resource-group-name> --attach-acr <acr-name>`.
parameters:
- name: --resource-group
type: string
short-summary: Specify the name of the Azure resource group.
- name: --destination
type: string
short-summary: Specify the path to the project directory (default is .).
- name: --cluster-name
type: string
short-summary: Specify the AKS cluster name.
- name: --registry-name
type: string
short-summary: Specify the path to the project directory.
- name: --container-name
type: string
short-summary: Specify the name of the container image.
- name: --branch
type: string
short-summary: Specify the Github branch to automatically deploy from.
- name: --path
type: string
short-summary: Automatically download and use the Draft binary at the specified location.
examples:
- name: Prompt to generate a Github workflow in the current directory.
text: az aks draft generate-workflow
- name: Prompt to generate a Github workflow in a specific project directory.
text: az aks draft generate-workflow --destination=/projects/some_project
- name: Generate a Github workflow with a resource group, an AKS cluster name, a container registry name in a specific project directory.
text: az aks draft generate-workflow --resource-group=some_rg --cluster-name=some_cluster --registry-name=some_registry --destination=/projects/some_project
- name: Generate a Github workflow that deploys from the main branch with a resource group, an AKS cluster name, a container registry name, and a container image name in a specific project directory.
text: az aks draft generate-workflow --branch=main --resource-group=some_rg --cluster-name=some_cluster --registry-name=some_registry --container-name=some_image --destination=/projects/some_project
"""

helps['aks draft up'] = """
type: command
short-summary: Set up Github OIDC and generate a Github workflow for automatic build and deploy to AKS
long-summary: This command combines `az aks draft setup-gh` and `az aks draft generate-workflow`.
Before running this command, create a resource group, a container registry and a Kubernetes cluster on Azure and
link the three resources using `az aks update -n <cluster-name> -g <resource-group-name> --attach-acr <acr-name>`.
parameters:
- name: --app
type: string
short-summary: Specify the name of the application.
- name: --subscription-id
type: string
short-summary: Specify the Azure subscription ID.
- name: --resource-group
type: string
short-summary: Specify the name of the Azure resource group.
- name: --provider
type: string
short-summary: Specify the cloud provider (default is azure).
- name: --gh-repo
type: string
short-summary: Specify the the github repository (organization/repo_name).
- name: --cluster-name
type: string
short-summary: Specify the AKS cluster name.
- name: --registry-name
type: string
short-summary: Specify the path to the project directory.
- name: --container-name
type: string
short-summary: Specify the name of the container image.
- name: --destination
type: string
short-summary: Specify the path to the project directory (default is .).
- name: --branch
type: string
short-summary: Specify the Github branch to automatically deploy from.
- name: --path
type: string
short-summary: Automatically download and use the Draft binary at the specified location.
examples:
- name: Prompt to setup the Github OIDC then generate a Github workflow in the current directory.
text: az aks draft up
- name: Prompt to setup the Github OIDC then generate a Github workflow in a specific project directory.
text: az aks draft up --destination=/projects/some_project
- name: Prompt to setup the Github OIDC for a specific repository then generate a Github workflow in a specific project directory.
text: az aks draft up --gh-repo=some_organization/some_repo --destination=/projects/some_project
"""

helps['aks draft update'] = """
type: command
short-summary: Update your application to be internet accessible.
long-summary: This command automatically updates your yaml files as necessary so that your
application will be able to receive external requests.
parameters:
- name: --host
type: string
short-summary: Specify the host of the ingress resource.
- name: --certificate
type: string
short-summary: Specify the URI of the Keyvault certificate to present.
- name: --destination
type: string
short-summary: Specify the path to the project directory (default is .).
- name: --path
type: string
short-summary: Automatically download and use the Draft binary at the specified location.
examples:
- name: Prompt to update the application to be internet accessible.
text: az aks draft update
- name: Prompt to update the application to be internet accessible in a specific project directory.
text: az aks draft update --destination=/projects/some_project
- name: Update the application to be internet accessible with a host of the ingress resource and a Keyvault certificate in a specific project directory.
text: az aks draft update --host=some_host --certificate=some_certificate --destination=/projects/some_project
"""
Loading