andxu / andy_doc-back Goto Github PK
View Code? Open in Web Editor NEWdoc for sessions
doc for sessions
Migration to track2 progress
azds version: 0.1.20190228.12
azds vscode extension: 0.1.120190228
JDK: 11
Steps
> Executing task: C:\Program Files\Microsoft SDKs\Azure\Azure Dev Spaces CLI (Preview)\azds.exe up --port=51452:7000 --detach --keep-alive --command /javadebug/start.sh <
Synchronizing files...2s
Using dev space 'default' with target 'sally37'
Installing Helm chart...1s
Waiting for container image build...4s
Building container image...
Step 1/8 : FROM maven:3.5-jdk-11-slim
Step 2/8 : EXPOSE 8080
Step 3/8 : WORKDIR /usr/src/app
Step 4/8 : COPY pom.xml ./
Step 5/8 : RUN /usr/local/bin/mvn-entrypoint.sh mvn package -Dmaven.test.skip=true -Dcheckstyle.skip=true -Dmaven.javadoc.skip=true --fail-never
Step 6/8 : COPY . .
Step 7/8 : RUN mvn package -Dmaven.test.skip=true -Dcheckstyle.skip=true -Dmaven.javadoc.skip=true
Step 8/8 : ENTRYPOINT ["java","-jar","target/webfrontend-0.1.0.jar"]
Built container image in 1m 18s
Waiting for container...5s
Service 'webfrontend' port 80 (http) is available at http://localhost:59163
Container cannot be reached.
The terminal process terminated with exit code: 1
Terminal will be reused by tasks, press any key to close it.
download the latest azure cli(version 2.0.42): https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest, if you have already installed the azure cli, please upgrade the version to latest version.
Create an azure kubernetes cluster with default default parameter and a specified group name and kubernetes cluster name and dns name, these names will be used later.
in console , run az login
and az account set --subscritpion=XXXXXXX
to switch to the subscription where the kubernetes cluster created.
if you previously installed azure dev-spaces cli, please uninstall it.
in terminal run az aks use-dev-spaces -g g -n n
, and install latest azure dev-spaces cli with the hint in console
When An Azure Dev Spaces Controller will be created that targets resource 'n' in resource group 'g'. Continue? (y/N):
hint appear, input 'N' since the group name and cluster name in the command line is wrong on purpose.
Remove all the files and folder under C:\Program Files\Microsoft SDKs\Azure\Azure Dev Spaces CLI (Preview)
, copy all the files in \\devdivcn\Shared\Personal\andxu\bugbash\AzdsCli-PrivateBuild
to this folder.
Open a new terminal: run azds --version
,make sure the following version is print:
Z:\Personal\andxu\bugbash\AzdsCli-PrivateBuild>azds --version Azure Dev Spaces CLI (Preview) 0.1.0.07191646-stephpr
Install the latest vscode, install extension: "Language support for Java", in vscode settings by ctrl + comma, add the following settings
"extensions.autoUpdate": false
install the vscode extension by the vsix in \\devdivcn\Shared\Personal\andxu\bugbash\azds-0.1.1.vsix
install the vscode extension by the vsix in \\devdivcn\Shared\Personal\andxu\bugbash\vscode-java-debugger-azds-0.1.0.vsix
Start a new terminal, run azds controller create -g <your resouce group name> -n <your kubernetes cluster name> -tg <your resouce group name> -tn <your kubernetes cluster name>
. When this terminal finishes, run azds controller select -g <your resouce group name> -n <your kubernetes cluster name>
and then run azds space select
and input 1
for the default space name.
clone the git to a directory: https://github.com/stepro/dev-spaces
and open the folder samples\java\getting-started\webfrontend
in vscode
In vscode, run the command by ctrl+shift+p: Azure Dev Spaces: prepare configuration files ...
Set a breakpoint at samples\java\getting-started\webfrontend\src\main\java\com\ms\sample\webfrontend\Application.java#line 19
, press F5, wait the breakpoint to be hit.
if step 15-17, if it passes, you can try any kind of maven projects(only single pom.xml is now supported).
Environment:
Operating System: Win10/Mac OS
JDK version: 1.8.0_191
Visual Studio Code version: 1.30.2
Azure cli: 2.0.54
Azure Dev Spaces CLI (Preview): 0.1.20190102.6
Build: 61
Repro steps:
Open one test project
F1 and select "AZDS: Prepare xxxx"
Result:
After selecting the base image for the first time, after a while, it will will let you choose again
az login
az account show
export SUBSCRIPTION=$(az account show --query id --output tsv)
export RESOURCE_GROUP=migrate-javaee-app
export WEBAPP=migrate-petstore-andxu
export REGION=eastus
export DATABASE_SERVER=migrate-petstore-andxu
export DATABASE_ADMIN=andxu
export DATABASE_ADMIN_PASSWORD=secret
export MYSQL_SERVER_NAME=mysql-${DATABASE_SERVER}
export MYSQL_SERVER_ADMIN_LOGIN_NAME=${DATABASE_ADMIN}
export MYSQL_SERVER_ADMIN_PASSWORD=${DATABASE_ADMIN_PASSWORD}
export MYSQL_DATABASE_NAME=petstore
export MYSQL_SERVER_FULL_NAME=${MYSQL_SERVER_NAME}.mysql.database.azure.com
export MYSQL_CONNECTION_URL=jdbc:mysql://${MYSQL_SERVER_FULL_NAME}:3306/${MYSQL_DATABASE_NAME}?ssl=true\&useLegacyDatetimeCode=false\&serverTimezone=GMT
export MYSQL_SERVER_ADMIN_FULL_NAME=${MYSQL_SERVER_ADMIN_LOGIN_NAME}\@${MYSQL_SERVER_NAME}
export DEVBOX_IP_ADDRESS=167.220.255.76
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_291.jdk/Contents/Home
az mysql server create --resource-group ${RESOURCE_GROUP} \
--name ${MYSQL_SERVER_NAME} --location ${REGION} \
--admin-user ${MYSQL_SERVER_ADMIN_LOGIN_NAME} \
--admin-password ${MYSQL_SERVER_ADMIN_PASSWORD} \
--sku-name GP_Gen5_32 \
--ssl-enforcement Disabled \
--version 5.7
az mysql server firewall-rule create --name allAzureIPs \
--server ${MYSQL_SERVER_NAME} \
--resource-group ${RESOURCE_GROUP} \
--start-ip-address 0.0.0.0 --end-ip-address 0.0.0.0
az mysql server firewall-rule create --name myDevBox \
--server ${MYSQL_SERVER_NAME} \
--resource-group ${RESOURCE_GROUP} \
--start-ip-address ${DEVBOX_IP_ADDRESS} --end-ip-address ${DEVBOX_IP_ADDRESS}
az mysql server configuration set --name wait_timeout \
--resource-group ${RESOURCE_GROUP} \
--server ${MYSQL_SERVER_NAME} --value 2147483
mysql -u ${MYSQL_SERVER_ADMIN_FULL_NAME} -h ${MYSQL_SERVER_FULL_NAME} -P 3306 -p
Preparation:
az aks use-dev-spaces -g <your resouce group name> -n <your kubernetes cluster name>
Azure Dev Spaces: prepare configuration files ...
samples\java\getting-started\webfrontend\src\main\java\com\ms\sample\webfrontend\Application.java#line 19
, press F5, wait the breakpoint to be hit.Operations | STS(4.0) | IDEA |
---|---|---|
Scaffolding |
|
|
Module management |
|
|
Navigation |
|
|
Live Information | Filtering |
|
Configuration |
|
|
Dependency Graph |
|
|
Editing |
|
No additional support |
Run Locally |
|
|
Deploy |
|
|
Debug |
|
|
Cloud Monitoring | ||
Cloud Diagnose | ||
Cloud Debug |
Preparation:
C:\Users\andxu>echo %AZDS_ENVIRONMENT%
%AZDS_ENVIRONMENT%
az aks use-dev-spaces -g <your resouce group name> -n <your kubernetes cluster name>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.