Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SetupOpenVPN
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CSD
public
SetupOpenVPN
Commits
bd0b918f
Commit
bd0b918f
authored
5 years ago
by
Fulvio Galeazzi
Browse files
Options
Downloads
Patches
Plain Diff
Update README.md
parent
6a69845d
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+18
-9
18 additions, 9 deletions
README.md
with
18 additions
and
9 deletions
README.md
+
18
−
9
View file @
bd0b918f
...
@@ -8,7 +8,7 @@ This package sets up:
...
@@ -8,7 +8,7 @@ This package sets up:
Pre-requisite
Pre-requisite
-------------
-------------
Ensure
`ansible`
is installed on both
`openvpn`
and
`authca`
, by executing:
:
Ensure
`ansible`
is installed on both
`openvpn`
and
`authca`
, by executing:
```
```
apt install ansible
apt install ansible
```
```
...
@@ -23,7 +23,7 @@ configured with a public IP address.
...
@@ -23,7 +23,7 @@ configured with a public IP address.
To avoid storing the installation SSH key to
`openvpn`
, we will use
`ssh-agent`
to
To avoid storing the installation SSH key to
`openvpn`
, we will use
`ssh-agent`
to
enable safer login to
`authca`
.
enable safer login to
`authca`
.
From your client machine, execute the following:
:
From your client machine, execute the following:
```
```
eval "$(ssh-agent)"
eval "$(ssh-agent)"
ssh-add <the_private_key_used_for_installation>
ssh-add <the_private_key_used_for_installation>
...
@@ -31,24 +31,30 @@ From your client machine, execute the following::
...
@@ -31,24 +31,30 @@ From your client machine, execute the following::
ssh -A ubuntu@openvpn # you should not be prompted for password/passphrase
ssh -A ubuntu@openvpn # you should not be prompted for password/passphrase
```
```
Now, on
`openvpn`
, verify your agent has the required identity loaded::
Now, on
`openvpn`
, verify your agent has the required identity loaded:
```
ssh-add -L
ssh-add -L
```
You should now be able to log into
`authca`
with::
You should now be able to log into
`authca`
with:
```
ssh ubuntu@authca
ssh ubuntu@authca
```
Bootstrap Ansible configuration
Bootstrap Ansible configuration
-------------------------------
-------------------------------
This step will:
:
This step will:
*
create a generic
`ansible`
user
*
create a generic
`ansible`
user
*
for such user, create
`~/.ssh/authorized_keys`
from keys stored by SSH-Agent on localhost (
`ssh-add -L`
)
*
for such user, create
`~/.ssh/authorized_keys`
from keys stored by SSH-Agent on localhost (
`ssh-add -L`
)
*
grant "sudo" privileges
*
grant "sudo" privileges
Execute the command (note that we override
`ansible_user`
with the
`-e`
switch,
Execute the command (note that we override
`ansible_user`
with the
`-e`
switch,
so it matches the generic user created during server installation)::
so it matches the generic user created during server installation):
```
ansible-playbook -e "ansible_user=ubuntu" -v -i inventory.yml playbooks/bootstrapconfig.yml
ansible-playbook -e "ansible_user=ubuntu" -v -i inventory.yml playbooks/bootstrapconfig.yml
```
Installation and Configuration
Installation and Configuration
------------------------------
------------------------------
...
@@ -58,8 +64,10 @@ your organization (country, province, city, organization name, email, organizati
...
@@ -58,8 +64,10 @@ your organization (country, province, city, organization name, email, organizati
Note that you won't be able to change those, afterwards.
Note that you won't be able to change those, afterwards.
Execute the
`setup.yml`
playbook::
Execute the
`setup.yml`
playbook:
```
ansible-playbook -v -i inventory.yml playbooks/setup.yml
ansible-playbook -v -i inventory.yml playbooks/setup.yml
```
which will take care of:
which will take care of:
*
installing some useful packages (see list in file
`roles/setup/vars/Debian.yml`
), as well as
`openvpn`
and
`easyRSA`
*
installing some useful packages (see list in file
`roles/setup/vars/Debian.yml`
), as well as
`openvpn`
and
`easyRSA`
...
@@ -81,12 +89,13 @@ to be continued
...
@@ -81,12 +89,13 @@ to be continued
License
License
-------
-------
This work is protected by CC-BY 4.0
This work is protected by CC-BY 4.0.
[

](https://creativecommons.org/licenses/by/4.0/)
[

](https://creativecommons.org/licenses/by/4.0/)
[

](https://creativecommons.org/licenses/by/4.0/)
***
Author Information
Author Information
------------------
------------------
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment