Skip to content

Commit 2271e41

Browse files
committed
Draft amazon lightsail provider
1 parent b194b11 commit 2271e41

File tree

3 files changed

+60
-2
lines changed

3 files changed

+60
-2
lines changed

app/static/provider-lightsail.vue

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
<template>
2+
<div>
3+
<div class="form-group">
4+
<label>
5+
Enter your AWS Access Key <a href="http://docs.aws.amazon.com/general/latest/gr/managing-aws-access-keys.html" title="http://docs.aws.amazon.com/general/latest/gr/managing-aws-access-keys.html" target="_blank" rel="noreferrer noopener" class="badge bagde-pill badge-primary">?</a>
6+
<br>
7+
Note: Make sure to use an IAM user with an acceptable policy attached (see <a
8+
href="https://github.com/trailofbits/algo/blob/master/docs/deploy-from-ansible.md" target="_blank" rel="noreferrer noopener" >docs</a>)
9+
</label>
10+
<input
11+
type="text"
12+
class="form-control"
13+
name="aws_access_key"
14+
v-model="aws_access_key"
15+
/>
16+
</div>
17+
<div class="form-group">
18+
<label>Enter your AWS Secret Key <a
19+
href="http://docs.aws.amazon.com/general/latest/gr/managing-aws-access-keys.html" title="http://docs.aws.amazon.com/general/latest/gr/managing-aws-access-keys.html" target="_blank" rel="noreferrer noopener" class="badge bagde-pill badge-primary">?</a></label>
20+
<input
21+
type="password"
22+
class="form-control"
23+
name="aws_secret_key"
24+
v-model="aws_secret_key">
25+
</div>
26+
<button class="btn btn-primary"
27+
type="button"
28+
v-on:click="submit"
29+
v-bind:disabled="!is_valid">
30+
Next
31+
</button>
32+
</div>
33+
</template>
34+
35+
<script>
36+
module.exports = {
37+
data: function() {
38+
return {
39+
aws_access_key: null,
40+
aws_secret_key: null
41+
};
42+
},
43+
computed: {
44+
is_valid() {
45+
return this.aws_access_key && this.aws_secret_key;
46+
}
47+
},
48+
methods: {
49+
submit() {
50+
this.$emit('submit', {
51+
aws_access_key: this.aws_access_key,
52+
aws_secret_key: this.aws_secret_key
53+
});
54+
}
55+
}
56+
};
57+
</script>

app/static/provider-setup.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ module.exports = {
5757
}
5858
},
5959
components: {
60-
'digitalocean': window.httpVueLoader('/static/provider-do.vue')
60+
'digitalocean': window.httpVueLoader('/static/provider-do.vue'),
61+
'lightsail': window.httpVueLoader('/static/provider-lightsail.vue')
6162
}
6263
};
6364
</script>

app/static/status-done.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<p>Config files and certificates are in the ./configs/ directory.</p>
55
<p>Go to <a href="https://whoer.net/" target="_blank" rel="noopener noopener">https://whoer.net/</a>
66
after connecting and ensure that all your traffic passes through the VPN.</p>
7-
<p>Local DNS resolver {{result.local_service_ip}}</p>
7+
<p v-if="result.local_service_ip">Local DNS resolver {{result.local_service_ip}}</p>
88
<p v-if="result.p12_export_password">The p12 and SSH keys password for new users is <code>{{result.p12_export_password}}</code></p>
99
<p v-if="result.CA_password">The CA key password is <code>{{result.CA_password}}</code></p>
1010
<p v-if="result.ssh_access">Shell access: <code>ssh -F configs/{{result.ansible_ssh_host}}/ssh_config {{config.server_name}}</code></p>

0 commit comments

Comments
 (0)