├── _config.yml ├── .github └── FUNDING.yml ├── component ├── rexport.js ├── component.css ├── component.js └── template.hbs ├── docs ├── authentication-screen.png └── configuration-screen.png ├── Dockerfile ├── .travis.yml ├── .gitignore ├── .editorconfig ├── .jshintrc ├── package.json ├── gulpfile.js ├── README.md ├── assets └── hetzner.svg └── LICENSE /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-cayman -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: [mxschmitt] 2 | -------------------------------------------------------------------------------- /component/rexport.js: -------------------------------------------------------------------------------- 1 | export { default } from 'nodes/components/driver-%%DRIVERNAME%%/component'; -------------------------------------------------------------------------------- /component/component.css: -------------------------------------------------------------------------------- 1 | .machine-driver.%%DRIVERNAME%% { 2 | background-image: url('hetzner.svg'); 3 | } 4 | -------------------------------------------------------------------------------- /docs/authentication-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mxschmitt/ui-driver-hetzner/HEAD/docs/authentication-screen.png -------------------------------------------------------------------------------- /docs/configuration-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mxschmitt/ui-driver-hetzner/HEAD/docs/configuration-screen.png -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:8 2 | 3 | ADD . /app 4 | 5 | WORKDIR /app 6 | 7 | RUN npm install 8 | RUN npm run build 9 | 10 | EXPOSE 3000 11 | ENTRYPOINT [ "npm", "start" ] 12 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - node 4 | script: 5 | - yarn install 6 | - yarn build 7 | deploy: 8 | provider: gcs 9 | access_key_id: $GCS_ACCESS_KEY_ID 10 | secret_access_key: $GCS_SECRET_ACCESS_KEY 11 | bucket: "hcloud-rancher-v2-ui-driver" 12 | acl: public-read 13 | skip_cleanup: true 14 | local-dir: dist 15 | on: 16 | branch: master -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /tmp 5 | # dependencies 6 | /node_modules 7 | /bower_components 8 | 9 | # misc 10 | /.sass-cache 11 | /connect.lock 12 | /coverage/* 13 | /libpeerconnection.log 14 | npm-debug.log 15 | testem.log 16 | .DS_Store 17 | .tern-port 18 | 19 | /dist 20 | # we use the package manager yarn 21 | package-json.lock -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps developers define and maintain consistent 2 | # coding styles between different editors and IDEs 3 | # editorconfig.org 4 | 5 | root = true 6 | 7 | 8 | [*] 9 | end_of_line = lf 10 | charset = utf-8 11 | trim_trailing_whitespace = true 12 | insert_final_newline = true 13 | indent_style = space 14 | indent_size = 2 15 | 16 | [*.js] 17 | indent_style = space 18 | indent_size = 2 19 | 20 | [*.hbs] 21 | insert_final_newline = false 22 | indent_style = space 23 | indent_size = 2 24 | 25 | [*.css] 26 | indent_style = space 27 | indent_size = 2 28 | 29 | [*.html] 30 | indent_style = space 31 | indent_size = 2 32 | 33 | [*.{diff,md}] 34 | trim_trailing_whitespace = false 35 | -------------------------------------------------------------------------------- /.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "predef": [ 3 | "document", 4 | "window", 5 | "-Promise", 6 | "jQuery", 7 | "$", 8 | "moment", 9 | "c3","d3", 10 | "Terminal", 11 | "Prism", 12 | "Ui", 13 | "dagreD3", 14 | "async", 15 | "AWS", 16 | "Identicon", 17 | "md5", 18 | "_", 19 | "NoVNC", 20 | "commonmark" 21 | ], 22 | "browser" : true, 23 | "boss" : true, 24 | "curly": true, 25 | "debug": false, 26 | "devel": true, 27 | "eqeqeq": true, 28 | "evil": true, 29 | "forin": false, 30 | "immed": false, 31 | "laxbreak": false, 32 | "newcap": true, 33 | "noarg": true, 34 | "noempty": false, 35 | "nonew": false, 36 | "nomen": false, 37 | "onevar": false, 38 | "plusplus": false, 39 | "regexp": false, 40 | "undef": true, 41 | "sub": true, 42 | "strict": false, 43 | "white": false, 44 | "eqnull": true, 45 | "esnext": true, 46 | "unused": true 47 | } 48 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ui-driver-hetzner", 3 | "version": "0.1.0", 4 | "description": "Rancher UI driver for the Hetzner Cloud docker-machine driver", 5 | "repository": { 6 | "type": "git", 7 | "url": "git+https://github.com/mxschmitt/ui-driver-hetzner.git" 8 | }, 9 | "author": "Max Schmitt", 10 | "license": "Apache-2.0", 11 | "bugs": { 12 | "url": "https://github.com/mxschmitt/ui-driver-hetzner/issues" 13 | }, 14 | "scripts": { 15 | "start": "gulp server", 16 | "clean": "gulp clean", 17 | "build": "gulp build" 18 | }, 19 | "homepage": "https://github.com/mxschmitt/ui-driver-hetzner#readme", 20 | "devDependencies": { 21 | "@babel/core": "^7.7.5", 22 | "@babel/preset-env": "^7.7.6", 23 | "babel-plugin-add-module-exports": "^1.0.2", 24 | "babel-plugin-transform-es2015-modules-amd": "^6.24.1", 25 | "babel-preset-env": "^1.7.0", 26 | "gulp": "4.0.2", 27 | "gulp-babel": "^8.0.0", 28 | "gulp-clean": "0.4.0", 29 | "gulp-concat": "2.6.1", 30 | "gulp-connect": "5.7.0", 31 | "gulp-jshint": "2.1.0", 32 | "gulp-replace": "1.0.0", 33 | "gulp-sourcemaps": "2.6.5", 34 | "jshint": "2.10.3", 35 | "replace-string": "^3.0.0", 36 | "yargs": "15.0.2" 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /gulpfile.js: -------------------------------------------------------------------------------- 1 | /* jshint node: true */ 2 | const gulp = require('gulp'); 3 | const clean = require('gulp-clean'); 4 | const gulpConcat = require('gulp-concat'); 5 | const gulpConnect = require('gulp-connect'); 6 | const replace = require('gulp-replace'); 7 | const babel = require('gulp-babel'); 8 | const argv = require('yargs').argv; 9 | const pkg = require('./package.json'); 10 | const fs = require('fs'); 11 | const replaceString = require('replace-string'); 12 | 13 | 14 | const NAME_TOKEN = '%%DRIVERNAME%%'; 15 | 16 | const BASE = 'component/'; 17 | const DIST = 'dist/'; 18 | const TMP = 'tmp/'; 19 | const ASSETS = 'assets/'; 20 | const DRIVER_NAME = argv.name || pkg.name.replace(/^ui-driver-/, ''); 21 | 22 | console.log('Driver Name:', DRIVER_NAME); 23 | 24 | if (!DRIVER_NAME) { 25 | console.log('Please include a driver name with the --name flag'); 26 | process.exit(1); 27 | } 28 | 29 | gulp.task('watch', function () { 30 | gulp.watch(['./component/*.js', './component/*.hbs', './component/*.css'], gulp.parallel('build')); 31 | }); 32 | 33 | gulp.task('clean', function () { 34 | return gulp.src([`${DIST}*.js`, `${DIST}*.css`, `${DIST}*.hbs`, `${TMP}*.js`, `${TMP}*.css`, `${TMP}*.hbs`,], { read: false }) 35 | .pipe(clean()); 36 | }); 37 | 38 | gulp.task('styles', gulp.series('clean', function () { 39 | return gulp.src([ 40 | BASE + '**.css' 41 | ]) 42 | .pipe(replace(NAME_TOKEN, DRIVER_NAME)) 43 | .pipe(gulpConcat(`component.css`, { newLine: ';\n' })) 44 | .pipe(gulp.dest(DIST)); 45 | })) 46 | 47 | gulp.task('assets', gulp.series('styles', function () { 48 | return gulp.src(ASSETS + '*') 49 | .pipe(gulp.dest(DIST)); 50 | })); 51 | 52 | gulp.task('babel', gulp.series('assets', function () { 53 | const babelOpts = { 54 | presets: [ 55 | [ 56 | "@babel/preset-env", { 57 | targets: { 58 | browsers: ["> 1%"] 59 | } 60 | }] 61 | ], 62 | plugins: [ 63 | "add-module-exports", 64 | [ 65 | "transform-es2015-modules-amd", { 66 | "noInterop": true, 67 | } 68 | ] 69 | ], 70 | comments: false, 71 | moduleId: `nodes/components/driver-${DRIVER_NAME}/component` 72 | } 73 | 74 | let hbs = fs.readFileSync(`${BASE}template.hbs`, 'utf8'); 75 | 76 | hbs = replaceString(hbs, NAME_TOKEN, DRIVER_NAME); 77 | 78 | hbs = Buffer.from(hbs).toString('base64'); 79 | 80 | return gulp.src([ 81 | `${BASE}component.js` 82 | ]) 83 | .pipe(replace('const LAYOUT;', `const LAYOUT = "${hbs}";`)) 84 | .pipe(replace(NAME_TOKEN, DRIVER_NAME)) 85 | .pipe(babel(babelOpts)) 86 | .pipe(gulpConcat(`component.js`, { newLine: ';\n' })) 87 | .pipe(gulp.dest(TMP)); 88 | })); 89 | 90 | gulp.task('rexport', gulp.series('babel', function () { 91 | const babelOpts = { 92 | presets: [ 93 | [ 94 | "@babel/preset-env", { 95 | targets: { 96 | browsers: ["> 1%"] 97 | } 98 | }] 99 | ], 100 | plugins: [ 101 | "add-module-exports", 102 | [ 103 | "transform-es2015-modules-amd", { 104 | "noInterop": true, 105 | } 106 | ] 107 | ], 108 | comments: false, 109 | moduleId: `ui/components/driver-${DRIVER_NAME}/component` 110 | } 111 | return gulp.src([ 112 | `${BASE}rexport.js` 113 | ]) 114 | .pipe(replace(NAME_TOKEN, DRIVER_NAME)) 115 | .pipe(babel(babelOpts)) 116 | .pipe(gulpConcat(`rexport.js`, { newLine: ';\n' })) 117 | .pipe(gulp.dest(TMP)); 118 | })); 119 | 120 | gulp.task('compile', gulp.series('rexport', function () { 121 | return gulp.src([ 122 | `${TMP}**.js` 123 | ]) 124 | .pipe(gulpConcat(`component.js`, { newLine: ';\n' })) 125 | .pipe(gulp.dest(DIST)); 126 | })); 127 | 128 | gulp.task('build', gulp.series('compile')); 129 | 130 | gulp.task('server', gulp.parallel(['build', 'watch'], function () { 131 | return gulpConnect.server({ 132 | root: [DIST], 133 | port: process.env.PORT || 3000, 134 | https: false, 135 | }); 136 | })); 137 | 138 | gulp.task('default', gulp.series('build')); 139 | 140 | gulp.task('watch', function () { 141 | gulp.watch(['./component/*.js', './component/*.hbs', './component/*.css'], gulp.parallel('build')); 142 | }); -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Rancher 2 Hetzner Cloud UI Driver 2 | 3 | [![Build Status](https://travis-ci.org/mxschmitt/ui-driver-hetzner.svg?branch=master)](https://travis-ci.org/mxschmitt/ui-driver-hetzner) 4 | 5 | Rancher 2.X UI driver for the [Hetzner Cloud](https://www.hetzner.de/cloud). For the Rancher 1 version check out the readme from the `v1.6` branch which you can find [here](https://github.com/mxschmitt/ui-driver-hetzner/blob/v1.6/README.md). 6 | 7 | ## Usage 8 | 9 | * Add a Machine Driver in Rancher 2 (`Cluster Management` -> `Drivers` -> `Node Drivers`) 10 | 11 | | Key | Value | 12 | | --- | ----- | 13 | | Download URL | `https://github.com/JonasProgrammer/docker-machine-driver-hetzner/releases/download/3.3.0/docker-machine-driver-hetzner_3.3.0_linux_amd64.tar.gz` | 14 | | Custom UI URL | `https://storage.googleapis.com/hcloud-rancher-v2-ui-driver/component.js` | 15 | | Whitelist Domains | `storage.googleapis.com` | 16 | 17 | * Wait for the driver to become "Active" 18 | * Go to Clusters -> Add Cluster, your driver and custom UI should show up. 19 | 20 | ![Authentication screen](docs/authentication-screen.png) 21 | ![Configuration screen](docs/configuration-screen.png) 22 | 23 | ## Compatibility 24 | 25 | The following `component.js` is always compatible with the latest Rancher 2.X version: 26 | 27 | `https://storage.googleapis.com/hcloud-rancher-v2-ui-driver/component.js` 28 | 29 | ### Rancher 2.0 30 | 31 | Use this `component.js` to support Rancher 2.0 version: 32 | 33 | `https://storage.googleapis.com/hcloud-rancher-v2-ui-driver/component-v20.js` 34 | 35 | ## Tested linux distributions 36 | 37 | To use `Debian` e.g. with a non default Storage Driver, you have to set it manually in the Engine Options of the Node Template in Rancher. 38 | 39 | ### Recommend 40 | 41 | | Image | Docker Version | Docker Storage Driver | 42 | |--------------|------------------------------------|------------------------| 43 | | Ubuntu 18.04 | 18.06 | overlay2 (default) | 44 | | Ubuntu 16.04 | 18.06 | aufs (default) | 45 | | Debian 9 | 18.06 | overlay2, overlay | 46 | | CentOS 7 | 18.06 | devicemapper (default) | 47 | | Fedora 27 | not supported (due docker-install) | | 48 | | Fedora 28 | not supported (due docker-install) | | 49 | 50 | ## Development 51 | 52 | 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. 53 | * `npm start` 54 | * The driver name can be optionally overridden: `npm start -- --name=DRIVERNAME` 55 | * The compiled files are viewable at http://localhost:3000. 56 | * **Note:** The development server does not currently automatically restart when files are changed. 57 | 58 | ## Building 59 | 60 | For other users to see your driver, you need to build it and host the output on a server accessible from their browsers. 61 | 62 | * `npm run build` 63 | * Copy the contents of the `dist` directory onto a webserver. 64 | * If your Rancher is configured to use HA or SSL, the server must also be available via HTTPS. 65 | 66 | ## Useful resources 67 | 68 | ### `Error creating machine: Error running provisioning: ssh command error:` 69 | 70 | Try to use `overlay2` and if it does not work `overlay` as `Storage Driver` in the `Engine Options` in the bottom. 71 | 72 | ### How secure is the `Private Network` feature? 73 | 74 | > Traffic between Cloud Servers inside a Network is private and isolated, but not automatically encrypted. We recommend you use TLS or similar protocols to encrypt sensitive traffic. 75 | 76 | Reference: [Hetzner Cloud documentation](https://wiki.hetzner.de/index.php/CloudServer/en#Is_traffic_inside_Hetzner_Cloud_Networks_encrypted.3F) 77 | 78 | The Rancher traffic between the agents and the Rancher related traffic to the nodes is fully encrypted over HTTPS/TLS. 79 | 80 | The custom application specific traffic is *not* encrypted. You can use e.g. the Weave CNI-Provider for that: https://rancher.com/docs/rancher/v2.x/en/faq/networking/cni-providers/#weave 81 | 82 | ### Requirements for Private Networks 83 | 84 | - Rancher host needs to be in the *same Private Network* as the selected one in the Node template 85 | - Under the global settings of Rancher the `server-url` needs to be the internal IP of the Private Network (you can find it in the Hetzner Cloud Console). Otherwise the traffic won't go through the Internal network. 86 | 87 | ### How to close the open ports on the public interface? 88 | 89 | You could use it e.g. in combination with that tool: https://github.com/vitobotta/hetzner-cloud-init 90 | -------------------------------------------------------------------------------- /assets/hetzner.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /component/component.js: -------------------------------------------------------------------------------- 1 | /*!!!!!!!!!!!Do not change anything between here (the DRIVERNAME placeholder will be automatically replaced at buildtime)!!!!!!!!!!!*/ 2 | import NodeDriver from 'shared/mixins/node-driver'; 3 | 4 | // import uiConstants from 'ui/utils/constants' 5 | 6 | // do not remove LAYOUT, it is replaced at build time with a base64 representation of the template of the hbs template 7 | // we do this to avoid converting template to a js file that returns a string and the cors issues that would come along with that 8 | const LAYOUT; 9 | /*!!!!!!!!!!!DO NOT CHANGE END!!!!!!!!!!!*/ 10 | 11 | 12 | /*!!!!!!!!!!!GLOBAL CONST START!!!!!!!!!!!*/ 13 | // EMBER API Access - if you need access to any of the Ember API's add them here in the same manner rather then import them via modules, since the dependencies exist in rancher we dont want to expor the modules in the amd def 14 | const computed = Ember.computed; 15 | const get = Ember.get; 16 | const set = Ember.set; 17 | const alias = Ember.computed.alias; 18 | const service = Ember.inject.service; 19 | 20 | /*!!!!!!!!!!!GLOBAL CONST END!!!!!!!!!!!*/ 21 | 22 | 23 | 24 | /*!!!!!!!!!!!DO NOT CHANGE START!!!!!!!!!!!*/ 25 | export default Ember.Component.extend(NodeDriver, { 26 | driverName: '%%DRIVERNAME%%', 27 | needAPIToken: true, 28 | config: alias('model.%%DRIVERNAME%%Config'), 29 | app: service(), 30 | 31 | init() { 32 | // This does on the fly template compiling, if you mess with this :cry: 33 | const decodedLayout = window.atob(LAYOUT); 34 | const template = Ember.HTMLBars.compile(decodedLayout, { 35 | moduleName: 'nodes/components/driver-%%DRIVERNAME%%/template' 36 | }); 37 | set(this, 'layout', template); 38 | 39 | this._super(...arguments); 40 | 41 | }, 42 | /*!!!!!!!!!!!DO NOT CHANGE END!!!!!!!!!!!*/ 43 | 44 | // Write your component here, starting with setting 'model' to a machine with your config populated 45 | bootstrap: function () { 46 | // bootstrap is called by rancher ui on 'init', you're better off doing your setup here rather then the init function to ensure everything is setup correctly 47 | let config = get(this, 'globalStore').createRecord({ 48 | type: '%%DRIVERNAME%%Config', 49 | additionalKey: [], 50 | serverType: 'cx21', // 4 GB Ram 51 | serverLocation: 'nbg1', // Nuremberg 52 | image: '', 53 | imageId: "168855", // ubuntu-18.04 54 | userData: '', 55 | networks: [], 56 | firewalls: [], 57 | usePrivateNetwork: false, 58 | serverLabel: [''], 59 | placementGroup: '' 60 | }); 61 | 62 | set(this, 'model.%%DRIVERNAME%%Config', config); 63 | }, 64 | 65 | // Add custom validation beyond what can be done from the config API schema 66 | validate() { 67 | // Get generic API validation errors 68 | this._super(); 69 | 70 | if (!this.get('model.%%DRIVERNAME%%Config.networks')) { 71 | this.set('model.%%DRIVERNAME%%Config.networks', []) 72 | } 73 | 74 | if (!this.get('model.%%DRIVERNAME%%Config.firewalls')) { 75 | this.set('model.%%DRIVERNAME%%Config.firewalls', []) 76 | } 77 | 78 | if (!this.get('model.%%DRIVERNAME%%Config.serverLabel')) { 79 | this.set('model.%%DRIVERNAME%%Config.serverLabel', []) 80 | } 81 | 82 | if (!this.get('model.%%DRIVERNAME%%Config.additionalKey')) { 83 | this.set('model.%%DRIVERNAME%%Config.additionalKey', []) 84 | } 85 | 86 | var errors = get(this, 'errors') || []; 87 | if (!get(this, 'model.name')) { 88 | errors.push('Name is required'); 89 | } 90 | 91 | // Set the array of errors for display, 92 | // and return true if saving should continue. 93 | if (get(errors, 'length')) { 94 | set(this, 'errors', errors); 95 | return false; 96 | } else { 97 | set(this, 'errors', null); 98 | return true; 99 | } 100 | }, 101 | actions: { 102 | getData() { 103 | this.set('gettingData', true); 104 | let that = this; 105 | Promise.all([this.apiRequest('/v1/locations'), this.apiRequest('/v1/images?per_page=50'), this.apiRequest('/v1/server_types'), this.apiRequest('/v1/networks'), this.apiRequest('/v1/ssh_keys'), this.apiRequest('/v1/firewalls'), this.apiRequest('/v1/placement_groups')]).then(function (responses) { 106 | that.setProperties({ 107 | errors: [], 108 | needAPIToken: false, 109 | gettingData: false, 110 | regionChoices: responses[0].locations, 111 | imageChoices: responses[1].images 112 | .map(image => ({ 113 | ...image, 114 | id: image.id.toString() 115 | })), 116 | sizeChoices: responses[2].server_types, 117 | networkChoices: responses[3].networks 118 | .map(network => ({ 119 | ...network, 120 | id: network.id.toString() 121 | })), 122 | keyChoices: responses[4].ssh_keys 123 | .map(key => ({ 124 | ...key, 125 | id: key.id.toString() 126 | })), 127 | firewallChoices: responses[5].firewalls 128 | .map(firewall => ({ 129 | ...firewall, 130 | id: firewall.id.toString() 131 | })), 132 | placementGroupChoices: responses[6].placement_groups 133 | }); 134 | }).catch(function (err) { 135 | err.then(function (msg) { 136 | that.setProperties({ 137 | errors: ['Error received from Hetzner Cloud: ' + msg.error.message], 138 | gettingData: false 139 | }) 140 | }) 141 | }) 142 | }, 143 | modifyNetworks: function (select) { 144 | let options = [...select.target.options].filter(o => o.selected).map(o => o.value) 145 | this.set('model.%%DRIVERNAME%%Config.networks', options); 146 | }, 147 | modifyFirewalls: function (select) { 148 | let options = [...select.target.options].filter(o => o.selected).map(o => o.value) 149 | this.set('model.%%DRIVERNAME%%Config.firewalls', options); 150 | }, 151 | setLabels: function(labels){ 152 | let labels_list = labels.map(l => l.key + "=" + l.value); 153 | this.set('model.%%DRIVERNAME%%Config.serverLabel', labels_list); 154 | 155 | this._super(labels); 156 | }, 157 | modifyKeys: function (select) { 158 | let options = [...select.target.options] 159 | .filter(o => o.selected) 160 | .map(o => this.keyChoices.find(keyChoice => keyChoice.id == o.value)["public_key"]); 161 | this.set('model.%%DRIVERNAME%%Config.additionalKey', options); 162 | }, 163 | }, 164 | apiRequest(path) { 165 | return fetch('https://api.hetzner.cloud' + path, { 166 | headers: { 167 | 'Authorization': 'Bearer ' + this.get('model.%%DRIVERNAME%%Config.apiToken'), 168 | }, 169 | }).then(res => res.ok ? res.json() : Promise.reject(res.json())); 170 | } 171 | // Any computed properties or custom logic can go here 172 | }); 173 | -------------------------------------------------------------------------------- /component/template.hbs: -------------------------------------------------------------------------------- 1 |
2 | {{#if needAPIToken}} 3 |
4 |
5 | Account Access 6 |
7 |
8 |
9 | 10 |
11 |
12 | {{input type="password" value=model.hetznerConfig.apiToken classNames="form-control" placeholder="Your Hetzner Cloud API Token"}} 13 |

Create it by switching into the 14 | Hetzner Cloud Console, choosing a project, go to Access → Tokens and create a new API token there.

15 |
16 |
17 | {{top-errors errors=errors}} 18 | 27 |
28 | {{else}} 29 |
30 | {{!-- This partial contains the quantity, name, and description fields --}} 31 |
32 | {{templateOptionsTitle}} 33 |
34 |
35 | Settings 36 |
37 |
38 |
39 | 40 |
41 |
42 | 47 |
48 |
49 |
50 |
51 | 52 |
53 |
54 | 59 |
60 |
61 | 62 |
63 |
64 | 69 |
70 |
71 |
72 |
73 | 76 |
77 |
78 | 79 |
80 |
81 | 82 |
83 |
84 | 89 |
90 |
91 |
92 | 95 |
96 |
97 |
98 | 99 |
100 |
101 | 106 |
107 |
108 | 109 |
110 |
111 | 116 |
117 |
118 | 119 | 125 |
126 |
127 | {{!-- This following contains the Name, Labels and Engine Options fields --}} 128 | {{form-name-description model=model nameRequired=true}} 129 | {{form-user-labels initialLabels=labelResource.labels setLabels=(action 'setLabels') expandAll=expandAll expand=(action expandFn) }} 130 | {{form-engine-opts machine=model showEngineUrl=showEngineUrl }} 131 | {{!-- This component shows errors produced by validate() in the component --}} 132 | {{top-errors errors=errors}} 133 | {{!-- This component shows the Create and Cancel buttons --}} 134 | {{save-cancel save="save" cancel=(action "cancel")}} 135 |
136 | {{/if}} 137 |
138 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | 177 | END OF TERMS AND CONDITIONS 178 | 179 | --------------------------------------------------------------------------------