1620 Commits

Author SHA1 Message Date
Eric Promislow
63ea2fc036 Don't manipulate docker during postinstall, only in builds or dev-runs
Signed-off-by: Eric Promislow <epromislow@suse.com>
2021-09-23 11:39:38 -07:00
Eric Promislow
6ef3643991 clarify the build process for nerdctl and the docker link
Signed-off-by: Eric Promislow <epromislow@suse.com>
2021-09-23 11:39:38 -07:00
Eric Promislow
59fdce88f6 Improvements for managing macOS utility symlinks:
1. Include docker in the UI, and specify that it links to nerdctl

2. Improve presentation of symlink explanations:
   - Remove leading white-space by using `white-space: pre-line` instead of `...:pre-wrap`
   - Use CSS to better associate explanations with their preceding checkbox

Signed-off-by: Eric Promislow <epromislow@suse.com>
2021-09-23 11:39:38 -07:00
Eric Promislow
a5880a94b5 expose the docker link in the UI for macos
Signed-off-by: Eric Promislow <epromislow@suse.com>
2021-09-23 11:39:38 -07:00
Eric Promislow
117e5bc864 import necessary library
Signed-off-by: Eric Promislow <epromislow@suse.com>
2021-09-23 11:39:38 -07:00
Eric Promislow
4d6afb1ba6 Copy nerdctl to docker in builds
Signed-off-by: Eric Promislow <epromislow@suse.com>
2021-09-23 11:39:38 -07:00
Eric Promislow
722af2752d Copy nerdctl.exe to docker.exe on windows
Signed-off-by: Eric Promislow <epromislow@suse.com>
2021-09-23 11:39:38 -07:00
Eric Promislow
4670f7f164 ensure other linux scripts don't have ctrl-m's in them
Signed-off-by: Eric Promislow <epromislow@suse.com>
2021-09-23 11:39:38 -07:00
Eric Promislow
a801128096 Manage an instance of docker as a symlink to nerdctl
Signed-off-by: Eric Promislow <epromislow@suse.com>
2021-09-23 11:39:37 -07:00
Eric Promislow
a1d497af36 check first-run before the settings file is created
Signed-off-by: Eric Promislow <epromislow@suse.com>
2021-09-23 11:39:37 -07:00
Mark Yen
a568170d5a Merge pull request #657 from rancher-sandbox/654-cull-windows-integration-list
Don't show rancher-desktop-data in the Integration list
2021-09-23 10:57:57 -07:00
Mark Yen
a1af7ac5d9 Lima: Force stop the VM if necessary to update base disk.
Addresses:
https://github.com/rancher-sandbox/rancher-desktop/pull/652#pullrequestreview-761459690

Signed-off-by: Mark Yen <mark.yen@suse.com>
2021-09-23 10:44:36 -07:00
Mark Yen
17ee47b463 Lima: clearify the base image update cases.
Fixes:
https://github.com/rancher-sandbox/rancher-desktop/pull/652#discussion_r714348469
https://github.com/rancher-sandbox/rancher-desktop/pull/652#discussion_r714352105

Signed-off-by: Mark Yen <mark.yen@suse.com>
2021-09-23 10:44:36 -07:00
Mark Yen
7468f0cecd Lima: replace base disk if it's out of date.
We will now replace the Lima base image (from under Lima) if the existing
version is old.  Note that the heuristics are based purely on the file name
in the configuration file; the image itself doesn't keep a record of the
version.

Signed-off-by: Mark Yen <mark.yen@suse.com>
2021-09-23 10:44:35 -07:00
Eric Promislow
0957f02f14 Don't show rancher-desktop-data in the Integration list
Signed-off-by: Eric Promislow <epromislow@suse.com>
2021-09-23 10:29:27 -07:00
Matt Farina
63574873c8 Merge pull request #632 from mook-as/win-installer-partial-elevate
NSIS: Only elevate for WSL installation
2021-09-23 13:18:45 -04:00
Mark Yen
07036d8aff Merge pull request #655 from mook-as/lima-path-migrate-vm-wrong
Path migration: Fix Lima VM name.
2021-09-22 16:53:37 -07:00
Mark Yen
677a64b3ce Path migration: Fix Lima VM name.
We ended up using `0` instead of `rd`; this meant the VM was never actually
migrated correctly.

Signed-off-by: Mark Yen <mark.yen@suse.com>
2021-09-22 16:35:33 -07:00
Matt Farina
1794123f28 Merge pull request #634 from mattfarina/win-agent 2021-09-22 19:29:28 -04:00
Matt Farina
7eb44facd9 Removing un-needed env setup
Signed-off-by: Matt Farina <matt.farina@suse.com>
2021-09-22 19:05:45 -04:00
Mark Yen
b4fe2aadc0 Merge pull request #642 from mook-as/win-persist-volume
Windows: Persist data on upgrades
2021-09-22 15:39:04 -07:00
Matt Farina
3f967c078f Updating to agent process handling and bugfix
- The agent had a bug that would cause it to exit when iptables
  was there was a resource conflict. Fixed that.
- The agent handling has been updated so that the agent exiting
  will have it relaunch.

Signed-off-by: Matt Farina <matt.farina@suse.com>
2021-09-22 18:07:52 -04:00
Jan Dubois
5acb67598f Merge pull request #653 from rancher-sandbox/make-shared
Make /etc shared because that is the actual mountpoint
2021-09-22 15:00:03 -07:00
Jan Dubois
af6d628f14 Make /etc shared because that is the actual mountpoint
Signed-off-by: Jan Dubois <jan.dubois@suse.com>
2021-09-22 14:45:48 -07:00
Matt Farina
50ce76c654 Merge pull request #650 from rancher-sandbox/nerdctl-sudo
Run nerdctl via sudo
2021-09-22 15:45:39 -04:00
Jan Dubois
1ee48338a8 Run nerdctl via sudo
Also needs to pass-through CONTAINERD_ADDRESS because we set it in
~/.profile and not yet in /etc/environment.

Signed-off-by: Jan Dubois <jan.dubois@suse.com>
2021-09-22 12:10:39 -07:00
Matt Farina
83fd3a6b4f Merge pull request #619 from rancher-sandbox/610-handle-multiple-contexts
Call kim with global context argument
2021-09-22 13:44:53 -04:00
Matt Farina
be1fd1be3c Merge pull request #596 from mook-as/initial-version
Add first-run dialog to pick Kubernetes version
2021-09-22 13:34:59 -04:00
Mark Yen
973171ccf8 build/install-wsl.ps1: Make the not-restarting message less scary.
The users will actually see this message (because for now the elevated
command prompt is visible).

Signed-off-by: Mark Yen <mark.yen@suse.com>
2021-09-22 10:01:57 -07:00
Mark Yen
00b6454367 build/install-wsl.ps1: Fix typos.
https://github.com/rancher-sandbox/rancher-desktop/pull/632#discussion_r713285772
https://github.com/rancher-sandbox/rancher-desktop/pull/632#discussion_r713384413

Signed-off-by: Mark Yen <mark.yen@suse.com>
2021-09-22 09:59:44 -07:00
Mark Yen
626ce9feae WSL: silence an error on creating data distribution.
Signed-off-by: Mark Yen <mark.yen@suse.com>
2021-09-22 09:06:07 -07:00
Mark Yen
439b0a9861 WSL: Delete the data distro on reset / factory reset.
Signed-off-by: Mark Yen <mark.yen@suse.com>
2021-09-22 09:05:34 -07:00
Mark Yen
3b5bbd1435 WSL: data distro: Exclude files that don't exist.
When upgrading from older versions of Rancher Desktop, the existing
distribution may not have all the files we expect.  In that case it's safe
to skip them when copying to create the data distribution, as they are not
required.

Signed-off-by: Mark Yen <mark.yen@suse.com>
2021-09-21 12:28:12 -07:00
Mark Yen
68d4785b4b WSL: busybox tar doesn't support gzip
Signed-off-by: Mark Yen <mark.yen@suse.com>
2021-09-21 11:22:17 -07:00
Jan Dubois
20c0dfb6e3 Merge pull request #635 from rancher-sandbox/upgrade-lima-volume
Update the Lima data volume when the ISO in the basedisk is updated
2021-09-21 11:15:05 -07:00
Mark Yen
cca0f25160 WSL: Use extra WSL distribution for storing data.
This makes it possible for us to upgrade the distribution cleanly.

Signed-off-by: Mark Yen <mark.yen@suse.com>
2021-09-21 11:01:13 -07:00
Mark Yen
906e1e97ed WSL: Refactor running wsl.exe (no functional change).
This pulls out the pattern where we run WSL.exe with some arguments (not
intended for running commands inside a distribution), and direct all output
to the log files.

Signed-off-by: Mark Yen <mark.yen@suse.com>
2021-09-21 11:01:08 -07:00
Jan Dubois
f10cd34fcc Update the Lima data volume when the ISO in the basedisk is updated
Signed-off-by: Jan Dubois <jan.dubois@suse.com>
2021-09-21 10:41:50 -07:00
Jan Dubois
b346ff42e7 Merge pull request #637 from rancher-sandbox/provisioning
Cleanup storage on instance boot
2021-09-21 10:32:55 -07:00
Jan Dubois
028a28061c Merge pull request #641 from rancher-sandbox/remove-debug-logs
Remove debug logs
2021-09-21 10:30:29 -07:00
Matt Farina
8c9d4836c1 Fixing lint issues
Signed-off-by: Matt Farina <matt.farina@suse.com>
2021-09-21 13:18:42 -04:00
Jan Dubois
48859a5350 Remove debug logging
Signed-off-by: Jan Dubois <jan.dubois@suse.com>
2021-09-21 09:58:46 -07:00
Jan Dubois
d3adee48e0 Run gofmt over src/go/nerdctl-stub/parse_args.go
Signed-off-by: Jan Dubois <jan.dubois@suse.com>
2021-09-21 09:57:25 -07:00
Jan Dubois
c9118535eb Don't move /etc/rancher to data volume; all of /etc is already there
Signed-off-by: Jan Dubois <jan.dubois@suse.com>
2021-09-20 22:48:19 -07:00
Jan Dubois
4bf9c82a16 Add filesystem cleanup to provisioning script
Signed-off-by: Jan Dubois <jan.dubois@suse.com>
2021-09-20 22:47:50 -07:00
Eric Promislow
2b40bffa5b Minor fixes for assuring kim works with the r-d context
Signed-off-by: Eric Promislow <epromislow@suse.com>
2021-09-20 17:13:42 -07:00
Eric Promislow
587a635215 - The --context option is always needed when calling kim internally
- Use a constant name, in preparation for a global constant APP_NAME

Signed-off-by: Eric Promislow <epromislow@suse.com>
2021-09-20 16:57:21 -07:00
Eric Promislow
04d515e286 Ensure we're pointing at the rancher-desktop context for kubectl
* Most of our uses of the k8s go through the K8s API directly,
  and that's hardwired to the rancher-desktop context.  All the
  other uses of `kubectl' are to set the context to rancher-desktop,
  so the --context argument would be redundant.

Signed-off-by: Eric Promislow <epromislow@suse.com>
2021-09-20 16:57:21 -07:00
Eric Promislow
9e64c0db5c Call kim with global context argument
Always point to the rancher-desktop context

Signed-off-by: Eric Promislow <epromislow@suse.com>
2021-09-20 16:57:21 -07:00
Matt Farina
ca71140556 Adding windows guest agent to enable port forwarding.
Signed-off-by: Matt Farina <matt.farina@suse.com>
2021-09-20 19:48:09 -04:00