Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v0.0.1 #minor #2

Merged
merged 1 commit into from
Jun 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Change Log

## v0.0.1 (2023-06-26)
### Features
* Initial release
45 changes: 27 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,36 @@
# ui-driver-skel
Skeleton Rancher UI driver for custom docker-machine drivers
# Rancher Vultr UI Driver

**Note: The Master branch works with Rancher 2.x+, if you are building a custom driver for Rancher 1.x use the 1.x branch**
Rancher 2.X UI driver for [Vultr](https://www.vultr.com).

## Setup
## Usage

* Fork this repository into your own account as `ui-driver-DRIVERNAME`
* DRIVERNAME should be the name of the driver that you would give to `docker-machine create --driver`, e.g. "mycompany", "digitalocean", "vultr", etc.
* Update the "name" in package.json to match
* You should also update description, URLs, etc, but these aren't strictly required.
* `npm install`
* Add a Machine Driver in Rancher 2 (`Cluster Management` -> `Drivers` -> `Node Drivers`)

| Key | Value |
| --- | ----- |
| Download URL | `https://github.com/vultr/docker-machine-driver-vultr/archive/refs/tags/v2.0.0.tar.gz` |
| Custom UI URL | `https://sjc1.vultrobjects.com/rancher-ui/component.js` |
| Whitelist Domains | `api.vultr.com, sjc1.vultrobjects.com` |

* Wait for the driver to become "Active"
* Go to Clusters -> Add Cluster, your driver and custom UI should show up.

![Authentication screen](docs/auth-screen.png)
![Configuration screen](docs/config-screen.png)

## Compatibility

The following `component.js` is always compatible with the latest Rancher 2.X version:

`https://sjc1.vultrobjects.com/rancher-ui/component.js`

## Development

This package contains a small web-server that will serve up the custom driver UI at `http://localhost:3000/component.js`. You can run this while developing and point the Rancher settings there.
This package contains a small web-server that will serve up the custom driver UI at `http://localhost:3000/component.js`. You can run this while developing and point the Rancher settings there.
* `npm start`
* The driver name can be optionally overridden: `npm start -- --name=DRIVERNAME`
* The compiled files are viewable at http://localhost:3000.
* **Note:** The development server does not currently automatically restart when files are changed.
* Do not use the `model.<drivername>Confg` signature to access your driver config in the template file, use the `config` alias that is already setup in the component

## Building

Expand All @@ -28,11 +40,8 @@ For other users to see your driver, you need to build it and host the output on
* Copy the contents of the `dist` directory onto a webserver.
* If your Rancher is configured to use HA or SSL, the server must also be available via HTTPS.

## Using
## Useful resources

* Add a Machine Driver in Rancher 2.0 (Global -> Node Drivers)
* Name: Your `DRIVERNAME` (see above).
* Download URL: The URL for the driver binary (e.g. `https://github.com/mycompany/docker-machine-mycompany/releases/download/v1.0.0/docker-machine-driver-mycompany-v1.0.0-linux-amd64.tar.gz`)
* Custom UI URL: The URL you uploaded the `dist` folder to, e.g. `https://github.com/mycompany/ui-driver-mycompany/releases/download/v1.0.0/component.js`)
* Wait for the driver to become "Active"
* Go to Clusters -> Add Cluster, your driver and custom UI should show up.
### `Error creating machine: Error running provisioning: ssh command error:`

Try to use `overlay2` and if it does not work `overlay` as `Storage Driver` in the `Engine Options` in the bottom.
Binary file added docs/auth-screen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/config-screen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.