Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e5cb20f

Browse filesBrowse files
Update contribution guidance for local dev cycle (Azure#130)
# Pull Request ## Issue Issue #, if available: ## Description Description of changes: ## License By submitting this pull request, I confirm that my contribution is made under the terms of the projects associated license.
1 parent d1a6af8 commit e5cb20f
Copy full SHA for e5cb20f

File tree

Expand file treeCollapse file tree

1 file changed

+174
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+174
-0
lines changed

‎CONTRIBUTING.md

Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+174Lines changed: 174 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,177 @@ Invoke-Build -File .\src\ALZ.build.ps1
2828
Invoke-Build -File .\src\ALZ.build.ps1
2929
Import-Module .\src\Artifacts\ALZ.psd1 -Force
3030
```
31+
32+
## How to do end to end local development with the bootstrap and starter modules
33+
34+
You can use the parameters `bootstrapModuleOverrideFolderPath` and `starterModuleOverrideFolderPath` to point to your local development folders. This will allow to make changes to all three modules locally and test them together without the need to commit the changes and push.
35+
36+
The following section provides an example folder structure and scripts to set up the local development environment and run the accelerator.
37+
38+
Example folder structure:
39+
40+
```plaintext
41+
🖥️/
42+
┗ 📂dev
43+
┣ 📂code
44+
┃ ┣ 📂accelerator-bootstrap-modules # https://github.com/Azure/accelerator-bootstrap-modules
45+
┃ ┣ 📂ALZ-Bicep # https://github.com/Azure/ALZ-Bicep
46+
┃ ┣ 📂ALZ-PowerShell-Module # https://github.com/Azure/ALZ-PowerShell-Module
47+
┃ ┗ 📂alz-terraform-accelerator # https://github.com/Azure/alz-terraform-accelerator
48+
┗ 📂acc
49+
┣ 📂bicep
50+
┃ ┣ 📂config
51+
┃ ┃ ┣ 📜inputs-azuredevops.yaml # ./docs/wiki/examples/powershell-inputs/inputs-azure-devops-bicep.yaml
52+
┃ ┃ ┣ 📜inputs-github.yaml # ./docs/wiki/examples/powershell-inputs/inputs-github-bicep.yaml
53+
┃ ┃ ┗ 📜inputs-local.yaml # ./docs/wiki/examples/powershell-inputs/inputs-local-bicep.yaml
54+
┃ ┗ 📂output
55+
┃ ┣ 📂azuredevops
56+
┃ ┣ 📂github
57+
┃ ┗ 📂local
58+
┗ 📂terraform
59+
┣ 📂config
60+
┃ ┣ 📜inputs-azuredevops.yaml # ./docs/wiki/examples/powershell-inputs/inputs-azure-devops-terraform.yaml
61+
┃ ┣ 📜inputs-github.yaml # ./docs/wiki/examples/powershell-inputs/inputs-github-terraform.yaml
62+
┃ ┗ 📜inputs-local.yaml # ./docs/wiki/examples/powershell-inputs/inputs-local-terraform.yaml
63+
┗ 📂output
64+
┣ 📂azuredevops
65+
┣ 📂github
66+
┗ 📂local
67+
```
68+
69+
Example folder structure script:
70+
71+
```pwsh
72+
$targetFolder = "dev"
73+
cd /
74+
mkdir "$targetFolder/code"
75+
76+
$bicepConfigFolder = "$targetFolder/acc/bicep/config"
77+
mkdir "$bicepConfigFolder"
78+
mkdir "$targetFolder/acc/bicep/output/azuredevops"
79+
mkdir "$targetFolder/acc/bicep/output/github"
80+
mkdir "$targetFolder/acc/bicep/output/local"
81+
82+
$terraformConfigFolder = "$targetFolder/acc/terraform/config"
83+
mkdir "$terraformConfigFolder"
84+
mkdir "$targetFolder/acc/terraform/output/azuredevops"
85+
mkdir "$targetFolder/acc/terraform/output/github"
86+
mkdir "$targetFolder/acc/terraform/output/local"
87+
88+
cd "$targetFolder/code"
89+
git clone https://github.com/Azure/accelerator-bootstrap-modules
90+
git clone https://github.com/Azure/ALZ-Bicep
91+
git clone https://github.com/Azure/ALZ-PowerShell-Module
92+
git clone https://github.com/Azure/alz-terraform-accelerator
93+
cd /
94+
95+
$exampleFolder = "$targetFolder/code/ALZ-PowerShell-Module/docs/wiki/examples/powershell-inputs"
96+
97+
Copy-Item -Path "$exampleFolder/inputs-azure-devops-bicep.yaml" -Destination "$bicepConfigFolder/inputs-azuredevops.yaml" -Force
98+
Copy-Item -Path "$exampleFolder/inputs-github-bicep.yaml" -Destination "$bicepConfigFolder/inputs-github.yaml" -Force
99+
Copy-Item -Path "$exampleFolder/inputs-local-bicep.yaml" -Destination "$bicepConfigFolder/inputs-local.yaml" -Force
100+
Copy-Item -Path "$exampleFolder/inputs-azure-devops-terraform.yaml" -Destination "$terraformConfigFolder/inputs-azuredevops.yaml" -Force
101+
Copy-Item -Path "$exampleFolder/inputs-github-terraform.yaml" -Destination "$terraformConfigFolder/inputs-github.yaml" -Force
102+
Copy-Item -Path "$exampleFolder/inputs-local-terraform.yaml" -Destination "$terraformConfigFolder/inputs-local.yaml" -Force
103+
104+
```
105+
106+
>IMPORTANT! - Now you'll need to update the input files with your settings for VCS, etc.
107+
108+
Example scripts to run the accelerator:
109+
110+
### Bicep Azure DevOps
111+
112+
Run this from the VSCode terminal for the ALZ-PowerShell-Module repository:
113+
114+
>IMPORTANT! - Make sure to update the input file with your settings for VCS, etc.
115+
116+
```pwsh
117+
Invoke-Build -File .\src\ALZ.build.ps1
118+
119+
$targetFolder = "dev"
120+
121+
# Uncomment to start fresh rather than relying on the -replaceFiles parameter
122+
# Remove-Item -Path "/$targetFolder/acc/bicep/output/azuredevops" -Recurse -Force
123+
124+
Deploy-Accelerator `
125+
-bootstrapModuleOverrideFolderPath "/$targetFolder/code/accelerator-bootstrap-modules" `
126+
-starterModuleOverrideFolderPath "/$targetFolder/code/ALZ-Bicep" `
127+
-output "/$targetFolder/acc/bicep/output/azuredevops" `
128+
-inputs "/$targetFolder/acc/bicep/config/inputs-azuredevops.yaml" `
129+
-verbose `
130+
-replaceFiles # This will replace the files in the output folder with the files in the bootstrap and starter modules, so any updates are taken into account
131+
132+
```
133+
134+
### Bicep GitHub
135+
136+
Run this from the VSCode terminal for the ALZ-PowerShell-Module repository:
137+
138+
>IMPORTANT! - Make sure to update the input file with your settings for VCS, etc.
139+
140+
```pwsh
141+
Invoke-Build -File .\src\ALZ.build.ps1
142+
143+
$targetFolder = "dev"
144+
145+
# Uncomment to start fresh rather than relying on the -replaceFiles parameter
146+
# Remove-Item -Path "/$targetFolder/acc/bicep/output/github" -Recurse -Force
147+
148+
Deploy-Accelerator `
149+
-bootstrapModuleOverrideFolderPath "/$targetFolder/code/accelerator-bootstrap-modules" `
150+
-starterModuleOverrideFolderPath "/$targetFolder/code/ALZ-Bicep" `
151+
-output "/$targetFolder/acc/bicep/output/github" `
152+
-inputs "/$targetFolder/acc/bicep/config/inputs-github.yaml" `
153+
-verbose `
154+
-replaceFiles # This will replace the files in the output folder with the files in the bootstrap and starter modules, so any updates are taken into account
155+
156+
```
157+
158+
### Terraform Azure DevOps
159+
160+
Run this from the VSCode terminal for the ALZ-PowerShell-Module repository:
161+
162+
>IMPORTANT! - Make sure to update the input file with your settings for VCS, etc.
163+
164+
```pwsh
165+
Invoke-Build -File .\src\ALZ.build.ps1
166+
167+
$targetFolder = "dev"
168+
169+
# Uncomment to start fresh rather than relying on the -replaceFiles parameter
170+
# Remove-Item -Path "/$targetFolder/acc/terraform/output/azuredevops" -Recurse -Force
171+
172+
Deploy-Accelerator `
173+
-bootstrapModuleOverrideFolderPath "/$targetFolder/code/accelerator-bootstrap-modules" `
174+
-starterModuleOverrideFolderPath "/$targetFolder/code/alz-terraform-accelerator/templates" `
175+
-output "/$targetFolder/acc/terraform/output/azuredevops" `
176+
-inputs "/$targetFolder/acc/terraform/config/inputs-azuredevops.yaml" `
177+
-verbose `
178+
-replaceFiles # This will replace the files in the output folder with the files in the bootstrap and starter modules, so any updates are taken into account
179+
180+
```
181+
182+
### Terraform GitHub
183+
184+
Run this from the VSCode terminal for the ALZ-PowerShell-Module repository:
185+
186+
>IMPORTANT! - Make sure to update the input file with your settings for VCS, etc.
187+
188+
```pwsh
189+
Invoke-Build -File .\src\ALZ.build.ps1
190+
191+
$targetFolder = "dev"
192+
193+
# Uncomment to start fresh rather than relying on the -replaceFiles parameter
194+
# Remove-Item -Path "/$targetFolder/acc/terraform/output/github" -Recurse -Force
195+
196+
Deploy-Accelerator `
197+
-bootstrapModuleOverrideFolderPath "/$targetFolder/code/accelerator-bootstrap-modules" `
198+
-starterModuleOverrideFolderPath "/$targetFolder/code/alz-terraform-accelerator/templates" `
199+
-output "/$targetFolder/acc/terraform/output/github" `
200+
-inputs "/$targetFolder/acc/terraform/config/inputs-github.yaml" `
201+
-verbose `
202+
-replaceFiles # This will replace the files in the output folder with the files in the bootstrap and starter modules, so any updates are taken into account
203+
204+
```

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.