rancher-sandbox / rancher-desktop Goto Github PK
View Code? Open in Web Editor NEWContainer Management and Kubernetes on the Desktop
Home Page: https://rancherdesktop.io
License: Apache License 2.0
Container Management and Kubernetes on the Desktop
Home Page: https://rancherdesktop.io
License: Apache License 2.0
Setup the toolchain so this application can be built into a Mac App. This does not yet need to be a signed app.
Stratos, the Cloud Foundry UI that can also do Kubernetes and Helm, is a UI we've invested heavily in and that can be built as an electron app. We should look at how to incorporate it into RD. This includes:
Through the preference UI, provide checkboxes to symlink kubectl and helm to /usr/local/bin on mac.
The goal of this is to provide the users with access to these tools. Eventually we will have other applications to expose here.
We currently install a homestead chart for minimal rancher. This is an in-development project that doesn't appear to be reaching production readiness in the near future. We need to move to using rancher itself instead.
We can start by replacing the the homestead chart tgz file with one from rancher and renaming the release-name to rancher.
Also, the UI calls it minimal rancher and that will need to be changed.
The developer tools are currently on in preferences by default. This should be a toggle and off by default. It could be a keyboard shortcut or an environment variable. Or, something else.
Currently all messages in the app are English-only. We may want to some day support additional languages.
(Filing this for scheduling & note taking purposes, but not expecting to get around to it any time soon.)
When RD is first run kubectl and helm should be automatically linked in to /usr/local/bin if it's possible
Github Rancher Telemetry, tied into Grafana. Similar to a welcome ping.
Default is opt-in, but you can opt-out.
This is for two use cases:
This button would delete the directories created in the library and force RD to restart (is this possible)?
Just like the preferences are able to be open via the menu, The Rancher Dashboard (new Vue UI) should be able to be exposed for the local cluster. This depends on #7.
Try for the virtual-box way: color the bar red for the last 1GB, and orange for the 3GB before that.
See https://nightcatsama.github.io/vue-slider-component/#/basics/process
When someone deploys a workload they will often want to access using a port forward. Today you need to know the right kubectl commands to make that happen.
We want to provide a UI that lists workloads and provides a button to create a port forward.
There are numerous details that still need to be worked out such as, is the list just for services or does it include pods?
include documenting maintainers and the review flow.
The default value provided by minikube is a fine default.
The UI for this should be in the Kubernetes preferences. It can be below the existing Kubernetes preferences and before the CLI linking section.
There should be validation on the values here. If a value passed in will cause a problem for minikube we should catch it, inform the user, and not save the setting.
On a pristine machine, with no minikube installed, on shutdown I get an error dialog telling me "Error stopping minikube" . Of course there is, it was never started.
The message should be squelched.
On a new machine, running npm run dev
, I get this error message in the console:
(node:15202) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, watch
at FSWatcher.start (internal/fs/watchers.js:169:26)
at Object.watch (fs.js:1343:11)
at new Tray (/Users/ericp/workspace/rancher/desktop/app/background.js:3916:8)
at _callee2$ (/Users/ericp/workspace/rancher/desktop/app/background.js:34665:18)
at tryCatch (/Users/ericp/workspace/rancher/desktop/app/background.js:32119:40)
at Generator.invoke [as _invoke] (/Users/ericp/workspace/rancher/desktop/app/background.js:32349:22)
at Generator.next (/Users/ericp/workspace/rancher/desktop/app/background.js:32174:21)
at asyncGeneratorStep (/Users/ericp/workspace/rancher/desktop/app/background.js:64:24)
at _next (/Users/ericp/workspace/rancher/desktop/app/background.js:86:9)
at /Users/ericp/workspace/rancher/desktop/app/background.js:93:7
(node:15202) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:15202) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
If I set the version to something like 1.20.4 it breaks minikube and I have to change it.
Also, the select menu is blank when the proposed current version isn't in the list.
When starting up on a new machine:
npm run setupmac
:X Exiting due to MK_BOOTSTRAPPER: unknown bootstrapper: k3s
npm run setupmac
:X Exiting due to MK_BOOTSTRAPPER: unknown bootstrapper: <empty string>
The dialog box contains a useless long block of code, consisting mostly of the status line
minikube-v1.17.0.iso: MiB / 212.69 MiB % MiB p/s ETA
repeated over and over without line breaks.
Similar to 33 - show human friendly messages, relay warning messages back to the user as well.
On first run RD downloads elements from the Internet. This can be slow and the first startup time is slow. Can this be packaged into the download and copied to the right place (or linked) on first run to speed up the startup experience.
When kubernetes goes into an error state the status indicator on the tray drop down and the rancher logo should turn red. This will indicate an error.
We should be able to tie this into the events for status.
The default value provided by minikube is a fine default.
The UI for this should be in the Kubernetes preferences. It can be below the existing Kubernetes preferences and before the CLI linking section.
There should be validation on the values here. If a value passed in will cause a problem for minikube we should catch it, inform the user, and not save the setting.
Eventually, we will want to support RD on Apple Silicon. This will likely take a little time and tools are still being ported and our dependencies are being ported. But, this is the top level issue to handle support of that.
Currently (with #92) we're disabling a bunch of linting rules, because that PR was already big enough. We should go back and turn on various lint rules and fix anything that crops up.
See https://github.com/mattfarina/rd/issues/92#issuecomment-774306004 for a list of things we should consider:
- non-interpolating strings: all single-quotes, double-quotes, or don't care?
I'd vote for double quotes, since that seems to be the majority of what we have. Also, that's the eslint default.- missing semicolons
We should set this toalways
, because that's what we've been doing.- I don't get the "missing trailing comma" message -- does json now allow them?
I have it set atalways-multiline
: comma on multi-line things (because it makes future diffs better), never otherwise. Also, eslint shouldn't lint JSON?- indentation
We have a.editorconfig
- spacing around braces
I guess we should take eslint defaults here?- extra
=
for all comparisons. Should be on because js type promotion can have unexpected results
Agreed.
The current error messages include exit codes and error messages that are not easy to understand. Exit codes include those of dependencies which are based on other dependencies.
The error messages (in popups) should be human readable with actions one can take if possible.
When one clicks on the "Reset Kubernetes" button k8s shuts down, the VM is deleted, a new one is created, and k8s is brought back up. This is left over from the way minikube does things by default.
Instead, when the "Reset Kubernetes" button is clicked k3s should be deleted and recreated. containerd should not be reset and images in containerd should stay cached in its location. Note, workloads running in k3s should be killed.
This update would include:
./.minikube/profiles/rancher-desktop/config.json
{
...
Bootstrapper: "",
}
shouldn't happen
The error message says it needs to be deleted and recreated with the new memory size.
We need a story for supporting this. At the simplest, if this is detected, we can delete it and create and start a new instance.
The sliders will change the settings in the settings files but RD doesn't apply them. If you restart rancher you get an error that requires running a console command to fix. This should be an intuitive experience.
#34 seems to have made npm run dev
a bit slower; we should try to see if we can speed it up a bit to make development easier.
The rancher dashboard has a dark mode. It shows, for example, a black body background instead of white. The preferences screens should support dark mode.
This makes it easier for us to do migrations in the future if existing prefs are dropped or renamed.
Still, we should try for full backward- and forward compatibility:
A local version of Rancher needs to be running in the environment. This is for a single cluster and does not include multi-cluster management.
Rancher installs many components that includes multi-cluster management. A lite version of Rancher (currently dubbed homestead) has numerous features turned off. This is rancher with different configuration to limit it to things like the dashboard (w/o cluster explorer), fleet, authn/z, and the catalog.
In the settings under a new tab on the left for "Rancher" we should have two or possibly more things. We can determine these when we move on this issue.
Note, if rancher is not installed or the UI is disabled the option in the menu should be removed.
I'd like to refactor the menu/tray code so that it's an EventEmitter
and we can emit events for the various menu items being clicked. Currently (in #46) I have it emitting events on app
, which seems rather wrong.
The current setup on mac uses minikube and the default image. k3s should be the running Kuberentes. There are a couple possible ways this could be done.
--iso-url
and registry location to swap out the default minikube environment for k3s.GitHub actions should be find for CI in this case
RD started as a POC but, as it moves to be a real project it needs testing. A framework needs to be added for testing.
Some messages are too important to be hidden in the dev-tools console (or in the shell for the background process), but putting them in a dialog box or notification box is too obtrusive. Best to put them in a status bar where they can be dismissed manually or cleared after a settable delay (which should be a prefs-only field).
The wiring with the Checkbox.vue component broke
The link targets are invalid on macos
A Promise object is treated like an error.
Pulling UI-testing out of issue #54 because it's a completely different animal.
We need to have RD running on Windows and that includes Windows Home where there is no hypervisor. Instead of a normal hypervisor we should use Windows Subsystem for Linux (likely v2). WSL is available on Windows 10 Home.
With WSL we could either install and manage k3s in an existing Linux or start up a custom Linux setup and expose K3s to windows and the other Linux instances from there. This is open for discussion.
This isn't going to use Minikube as minikube on Windows doesn't work with WSL to manage the things.
There are two issues with linking Helm and kubectl into the path...
(we have discussed this before)
https://github.com/mattfarina/rd/blob/8c92884da7a60fa8984bb7f501a63ee2afed6e3d/background.js#L197
is looking only at /usr/local/bin
It should probably check the PATH
and not auto-link if found. In my case, helm
is my in PATH
but not in /usr/local/bin
so RD ends up masking my helm install with its own.
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.