Skip to content

Commit

Permalink
Update documentation to feature new install methods more prominently (#…
Browse files Browse the repository at this point in the history
…1690)

* Update documentation to feature new install methods more prominently

* Document brew scenarios more

* Add choco and winget to cspell dictionary

* Mention package manager uninstall
  • Loading branch information
danieljurek committed Mar 9, 2023
1 parent 9ce7165 commit 858a4df
Show file tree
Hide file tree
Showing 3 changed files with 114 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .vscode/cspell.global.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ words:
- opentelemetry
- bson
- azdo
- choco
- winget
ignoreWords:
- AADSTS
- afwp
Expand Down
31 changes: 29 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,34 @@ For advanced install scenarios see [Azure Developer CLI Installer Scripts](cli/i

### Windows

#### Windows Package Manager (winget)

```powershell
winget install microsoft.azd
```

#### Chocolatey

```powershell
choco install azd
```

#### Install script

```powershell
powershell -ex AllSigned -c "Invoke-RestMethod 'https://aka.ms/install-azd.ps1' | Invoke-Expression"
```
### MacOS

### Linux/MacOS
#### Homebrew

```bash
brew tap azure/azd && brew install azd
```

If using `brew` to upgrade `azd` from a version not installed using `brew`, remove the existing version of `azd` using the uninstall script (if installed to the default location) or by deleting the `azd` binary manually.

### Linux

```
curl -fsSL https://aka.ms/install-azd.sh | bash
Expand All @@ -47,7 +70,7 @@ For example, to get the instructions for `bash` run `azd completion bash --help`

#### Uninstalling 0.5.0-beta.1 and later

The Azure Developer CLI uses MSI to install on Windows. Use the "Add or remove programs" dialog in Windows to remove the "Azure Developer CLI" application.
The Azure Developer CLI uses MSI to install on Windows. Use the "Add or remove programs" dialog in Windows to remove the "Azure Developer CLI" application. If installed using a package manager like winget or choco, uninstall using the package manager's uninstall command.

#### Uninstalling version 0.4.0-beta.1 and earlier

Expand All @@ -59,10 +82,14 @@ powershell -ex AllSigned -c "Invoke-RestMethod 'https://aka.ms/uninstall-azd.ps1

### Linux/MacOS

If installed using the script, uninstall using this script.

```
curl -fsSL https://aka.ms/uninstall-azd.sh | bash
```

If installed using a package manager, uninstall using the package manager's uninstall command.

## Data Collection

The software may collect information about you and your use of the software and send it to Microsoft. Microsoft may use this information to provide services and improve our products and services. You may turn off the telemetry as described in the repository. There are also some features in the software that may enable you and Microsoft to collect data from users of your applications. If you use these features, you must comply with applicable law, including providing appropriate notices to users of your applications together with a copy of Microsoft's privacy statement. Our privacy statement is located at https://go.microsoft.com/fwlink/?LinkId=521839. You can learn more about data collection and use in the help documentation and our privacy statement. Your use of the software operates as your consent to these practices.
Expand Down
84 changes: 83 additions & 1 deletion cli/installer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,22 @@

### Windows

#### Windows Package Manager (winget)

```powershell
winget install microsoft.azd
```

#### Chocolatey

```powershell
choco install azd
```

#### Install script

The install script downloads and installs the MSI package on the machine with default parameters.

```powershell
powershell -ex AllSigned -c "Invoke-RestMethod 'https://aka.ms/install-azd.ps1' | Invoke-Expression"
```
Expand All @@ -14,10 +30,29 @@ Windows installations of the Azure Developer CLI now use MSI. The PowerShell scr

See [MSI configuration](#msi-configuration) for advanced install scenarios.

### MacOS

### Linux/MacOS
#### Homebrew (recommended)

```bash
brew tap azure/azd && brew install azd
```

The `brew tap azure/azd` command only needs to be run once to configure the tap in `brew`.

If using `brew` to upgrade `azd` from a version not installed using `brew`, remove the existing version of `azd` using the uninstall script (if installed to the default location) or by deleting the `azd` binary manually.

#### Script

The install script can be used to install `azd` at the machine scope.

```bash
curl -fsSL https://aka.ms/install-azd.sh | bash
```

### Linux

```bash
curl -fsSL https://aka.ms/install-azd.sh | bash
```

Expand Down Expand Up @@ -60,6 +95,26 @@ When installing using the MSI directly (instead of the install script) the MSI b
| `ALLUSERS` | `2`: Default. Install for current user (no privilege elevation required). <br/> `1`: Install for _all_ users (may require privilege elevation). |
| `INSTALLDIR` | Installation path. <br/> `"%LOCALAPPDATA%\Programs\Azure Dev CLI"`: Default. <br/> `"%PROGRAMFILES%\Azure Dev CLI"`: Default all users. |

### Custom install location

#### Windows

The installer script can specify a custom location to the MSI installation:

```powershell
powershell -ex AllSigned -c "Invoke-RestMethod 'https://aka.ms/install-azd.ps1' -OutFile 'install-azd.ps1'; ./install-azd.ps1 -InstallFolder 'C:\utils\azd'"
```

#### Linux/MacOS

Specify the `--install-folder` when running the script. For example:

```bash
curl -fsSL https://aka.ms/install-azd.sh | bash -s -- --install-folder "~/mybin"`
```

The `--install-folder` parameter places the `azd` binary in the specified location. If the current user has write access to that location the install script will not attempt to elevate permissions using `sudo`. If the specified install folder does not exist the install will fail.

### Download from daily builds

The `daily` feed is periodically updated with builds from the latest source code in the `main` branch. Use the `version` parameter to download the latest daily release.
Expand Down Expand Up @@ -127,3 +182,30 @@ To download and install the "daily" version of azd (most recent build)
```bash
./install-azd.sh --version daily
```

## Uninstall

The Azure Developer CLI will write files to `~/.azd/` that are specific to the application's usage. Since this is user data uninstall processes do not alter or remove this data.
### Windows
For versions released after `0.5.0-beta.1` use the following procedure to remove `azd`:
1. Search for `Add or remove programs` in Windows
2. Locate `Azure Developer CLI`
3. Select `Uninstall`
Uninstall script for version s released before `0.5.0-beta.1` (does not work on versions `0.5.0-beta.1` and later):
```powershell
powershell -ex AllSigned -c "Invoke-RestMethod 'https://aka.ms/uninstall-azd.ps1' | Invoke-Expression"
```
### Linux/MacOS
If installed to the default location using the installation script `azd` can be removed using the uninstall script.
```bash
curl -fsSL https://aka.ms/uninstall-azd.sh | bash
```
If installed to a custom location, remove `azd` by deleting the `azd` executable at the custom install location.

0 comments on commit 858a4df

Please sign in to comment.