-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Landscape): Hostagent URL moved to Landscape config file (#365)
The landscape client config currently needs at least three fields: ``` [client] url = https://landscape.canonical.com/message-system ping_url = http://landscape.canonical.com/ping account_name = dummy ``` There is another registry key right now called LandscapeAgentURL which is used for the Windows-Agent gRPC connection. It would make more sense to put this information in the config as well, for example: ``` [host] url = https://landscape.canonical.com/hostagent [client] url = https://landscape.canonical.com/message-system ping_url = http://landscape.canonical.com/ping account_name = dummy ``` The host section is removed before writing the file to `/etc/landscape/client.conf`. --- In the future, we'll have to change the default value of `host/url`. It defaults to empty string both before and after this PR. We'd want it to default to Canonical's URL. This has been captured in Jira card 1687. --- UDENG-1644
- Loading branch information
Showing
18 changed files
with
131 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# How to restart Ubuntu Pro for Windows | ||
Some configuration changes only apply when you restart Ubuntu Pro for Windows. Here is a guide on how to restart it. | ||
|
||
## Option 1: Restart your machine | ||
This is the simple one. If you're not in a hurry to see the configuration updated, just wait until next time you boot your machine. | ||
|
||
## Option 2: Restart only Ubuntu Pro For Windows | ||
1. Stop the agent: | ||
```powershell | ||
Get-Process -Name Ubuntu-Pro-Agent | Stop-Process | ||
``` | ||
2. Stop the distro, or distros you installed WSL-Pro-Service in: | ||
```powershell | ||
wsl --terminate DISTRO_NAME_1 | ||
wsl --terminate DISTRO_NAME_2 | ||
# etc. | ||
# Alternatively, stop all distros: | ||
wsl --shutdown | ||
``` | ||
7. Start the agent again: | ||
1. Open the start Menu and search for "Ubuntu Pro For Windows". | ||
2. The GUI should start. | ||
3. Wait a minute. | ||
4. Click on "Click to restart it". | ||
8. Start the distro, or distros you installed WSL-Pro-Service in. | ||
# How to reset Ubuntu Pro for Windows back to factory settings | ||
If you want to restart UP4W with factory settings, do: | ||
1. Stop the agent and WSL: | ||
```powershell | ||
Get-Process -Name "Ubuntu-Pro-Agent" | Stop-Process` | ||
wsl --shutdown | ||
``` | ||
1. Remove folder `$env:LocalAppData\UbuntuPro`. | ||
2. Remove registry key `HKEY_CURRENT_USER\Software\Canonical\UbuntuPro`. | ||
3. You're done. Next time you start the GUI it'll be like a fresh install. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# How to auto-register WSL distros to Landscape with UP4W | ||
You can use a private Landscape instance (different from [landscape.canonical.com](https://landscape.canonical.com)). It must be over HTTP, as using certificates is not yet supported. To do so, follow these steps: | ||
1. Find registry key `HKEY_CURRENT_USER\Software\Canonical\UbuntuPro`, field `LandscapeClientConfig`. | ||
2. Copy the contents of the Landscape configuration file into the registry key: | ||
```ini | ||
[host] | ||
# The main URL for the landscape server to connect this client to. If you | ||
# purchased a Landscape Dedicated Server (LDS), change this to point to your | ||
# server instead. This needs to point to the message-system URL. | ||
# | ||
# Please pay special attention to the protocol used here, since it is a common | ||
# source of error. | ||
url = https://landscape.canonical.com/TODO-HOSTAGENT-ENDPOINT | ||
|
||
[client] | ||
# The configuration for the WSL client. See an example here | ||
# https://github.com/canonical/landscape-client/blob/master/example.conf | ||
``` | ||
3. The changes will take effect next time you start Ubuntu Pro For Windows. All new distros will automatically become landscape-enabled. If you want them to be applied now, follow the steps on how to restart Ubuntu Pro For Windows. Otherwise, you're done. |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.