Skip to content

Commit

Permalink
Added local and openstack providers
Browse files Browse the repository at this point in the history
  • Loading branch information
summerisgone committed Jul 6, 2021
1 parent 6a72539 commit 15b0d1f
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 1 deletion.
68 changes: 68 additions & 0 deletions app/static/provider-local.vue
@@ -0,0 +1,68 @@
<template>
<div>
<div class="form-group">
<label for="id_server">
Enter the IP address of your server: (or use localhost for local installation):
</label>
<input
type="text"
class="form-control"
id="id_server"
name="server"
v-model="server"
/>
</div>
<div class="form-group">
<label for="id_ssh_user">
What user should we use to login on the server? (note: passwordless login required, or ignore if you're deploying to localhost)
</label>
<input
type="text"
class="form-control"
id="id_ssh_user"
name="ssh_user"
v-model="ssh_user"
/>
</div>
<div class="form-group">
<label for="id_endpoint">
Enter the public IP address or domain name of your server: (IMPORTANT! This is used to verify the certificate)
</label>
<input
type="text"
class="form-control"
id="id_endpoint"
name="endpoint"
v-model="endpoint"
/>
</div>
<button v-on:click="submit"
v-bind:disabled="!is_valid" class="btn btn-primary" type="button">Next</button>
</div>
</template>

<script>
module.exports = {
data: function() {
return {
server: null,
ssh_user: null,
endpoint: null
}
},
computed: {
is_valid() {
return this.server && this.ssh_user && this.endpoint;
}
},
methods: {
submit() {
this.$emit("submit", {
server: this.server,
ssh_user: this.ssh_user,
endpoint: this.endpoint
});
}
}
};
</script>
19 changes: 19 additions & 0 deletions app/static/provider-openstack.vue
@@ -0,0 +1,19 @@
<template>
<div>
<p>
Download OpenStack credentials from the OpenStack dashboard->Compute->API Access and source it in the shell (eg:
source /tmp/dhc-openrc.sh)
</p>
<button v-on:click="submit" class="btn btn-primary" type="button">Next</button>
</div>
</template>

<script>
module.exports = {
methods: {
submit() {
this.$emit("submit");
}
}
};
</script>
4 changes: 3 additions & 1 deletion app/static/provider-setup.vue
Expand Up @@ -67,7 +67,9 @@ module.exports = {
'hetzner': window.httpVueLoader('/static/provider-hetzner.vue'),
'azure': window.httpVueLoader('/static/provider-azure.vue'),
'linode': window.httpVueLoader('/static/provider-linode.vue'),
'cloudstack': window.httpVueLoader('/static/provider-cloudstack.vue')
'cloudstack': window.httpVueLoader('/static/provider-cloudstack.vue'),
'openstack': window.httpVueLoader('/static/provider-openstack.vue'),
'local': window.httpVueLoader('/static/provider-local.vue')
}
};
</script>

0 comments on commit 15b0d1f

Please sign in to comment.