Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
GoikLectures
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Goik Martin
GoikLectures
Commits
2ec9a429
Commit
2ec9a429
authored
11 months ago
by
Goik Martin
Browse files
Options
Downloads
Patches
Plain Diff
Hetzner intro
parent
1eaae76f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Doc/Sdi/Hetzner/gettingStarted.xml
+204
-0
204 additions, 0 deletions
Doc/Sdi/Hetzner/gettingStarted.xml
Doc/lectures.xml
+2
-0
2 additions, 0 deletions
Doc/lectures.xml
with
206 additions
and
0 deletions
Doc/Sdi/Hetzner/gettingStarted.xml
0 → 100644
+
204
−
0
View file @
2ec9a429
<?xml version="1.0" encoding="UTF-8"?>
<chapter
version=
"5.1"
xml:id=
"sdi_hetzner"
xmlns=
"http://docbook.org/ns/docbook"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
xmlns:xila=
"http://www.w3.org/2001/XInclude/local-attributes"
xmlns:xi=
"http://www.w3.org/2001/XInclude"
xmlns:trans=
"http://docbook.org/ns/transclusion"
xmlns:svg=
"http://www.w3.org/2000/svg"
xmlns:m=
"http://www.w3.org/1998/Math/MathML"
xmlns:html=
"http://www.w3.org/1999/xhtml"
xmlns:db=
"http://docbook.org/ns/docbook"
>
<title>
Using the
<orgname
xlink:href=
"https://hetzner.com"
>
Hetzner
</orgname>
cloud
</title>
<section
xml:id=
"sdi_hetzner_getstarted"
>
<title>
Getting started
</title>
<figure
xml:id=
"sdi_hetzner_getstarted_createSshKeyPair"
>
<title>
Create an
<command>
ssh
</command>
key pair
</title>
<screen>
sdiuser@martin-pc-dachboden:~$ ssh-keygen -t ed25519
Generating public/private ed25519 key pair.
Enter file in which to save the key (/home/sdiuser/.ssh/id_ed25519):
Created directory '/home/sdiuser/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/sdiuser/.ssh/id_ed25519
Your public key has been saved in /home/sdiuser/.ssh/id_ed25519.pub
</screen>
</figure>
<figure
xml:id=
"sdi_hetzner_getstarted_hetznerSignUp"
>
<title>
Create a
<orgname>
Hetzner
</orgname>
account
</title>
<itemizedlist>
<listitem>
<para>
Sign up at
<link
xlink:href=
"https://accounts.hetzner.com/signUp"
>
https://accounts.hetzner.com/signUp
</link>
using an account name of your choice.
</para>
</listitem>
<listitem>
<para>
Optionally: Activate 2-factor authentication.
</para>
</listitem>
<listitem>
<para>
You may validate your account by ID card or similar. No
payment required!
</para>
</listitem>
<listitem>
<para>
Publish your
<orgname>
Hetzner
</orgname>
account's username to
your SDI course's group at
<link
xlink:href=
"https://learn.mi.hdm-stuttgart.de"
>
https://learn.mi.hdm-stuttgart.de
</link>
.
</para>
</listitem>
</itemizedlist>
</figure>
<figure
xml:id=
"sdi_hetzner_getstarted_accessProject"
>
<title>
Access your project space
</title>
<para>
Upon confirmation your
<orgname>
Hetzner
</orgname>
project space
sdi_gxy (e.g. sdi_g01 corresponding to group 1) should be
accessible.
</para>
</figure>
<figure
xml:id=
"sdi_hetzner_getstarted_"
>
<title>
Create a server
</title>
<informaltable
border=
"0"
>
<tr>
<td
valign=
"top"
><orderedlist>
<listitem>
<para>
Create a default firewall
</para>
</listitem>
<listitem>
<para><productname>
Ubuntu
</productname>
latest
</para>
</listitem>
<listitem>
<para>
Shared vCPU / x86 / CX11
</para>
</listitem>
<listitem>
<para>
Add
<command>
ssh
</command>
public key
</para>
</listitem>
</orderedlist></td>
<td
valign=
"top"
><orderedlist
continuation=
"continues"
>
<listitem>
<para>
Omit volume, labels and cloud config
</para>
</listitem>
<listitem>
<para>
Note the Networking / Public IPv4 address for later
reference
</para>
</listitem>
<listitem>
<para>
Click »Create
&
Buy now«
</para>
</listitem>
</orderedlist></td>
</tr>
</informaltable>
</figure>
<figure
xml:id=
"sdi_hetzner_getstarted_accessServer"
>
<title>
Access your server
</title>
<itemizedlist>
<listitem>
<para>
Ping your server
</para>
<screen>
sdiuser:~$ ping 91.107.232.156
PING 91.107.232.156 (91.107.232.156) 56(84) bytes of data.
64 bytes from 91.107.232.156: icmp_seq=1 ttl=49 time=18.3 ms
64 bytes from 91.107.232.156 ...
</screen>
</listitem>
<listitem>
<para>
Login via
<command>
ssh
</command></para>
<screen>
ssh root@91.107.232.156
</screen>
</listitem>
</itemizedlist>
</figure>
<figure
xml:id=
"sdi_hetzner_getstarted_updateServer"
>
<title>
Update and reboot
</title>
<orderedlist>
<listitem>
<para>
apt update
</para>
</listitem>
<listitem>
<para>
apt upgrade
</para>
</listitem>
<listitem>
<para>
reboot
</para>
</listitem>
</orderedlist>
</figure>
<figure
xml:id=
"sdi_hetzner_getstarted_installNginx"
>
<title>
Install a web server
</title>
<screen>
root@topsy:~# apt install nginx
</screen>
</figure>
<figure
xml:id=
"sdi_hetzner_getstarted_localHttpAccess"
>
<title>
Check local
<acronym>
http
</acronym>
web access
</title>
<screen>
root@topsy:~# wget -O - 91.107.232.156
--2024-04-07 18:59:13-- http://91.107.232.156/
Connecting to 91.107.232.156:80... connected.
<
html
>
<
head
>
<
title
>
Welcome to nginx!
<
/title
>
...
</screen>
</figure>
<figure
xml:id=
"sdi_hetzner_getstarted_externHttp"
>
<title>
External
<acronym>
http
</acronym>
web access
</title>
<para>
Point your browser to http://91.107.232.156.
</para>
<screen>
sdiuser:~$ telnet 91.107.232.156 80
Trying 91.107.232.156...
</screen>
<para>
Why is there no answer?
</para>
</figure>
<figure
xml:id=
"sdi_hetzner_getstarted_allowHttp"
>
<title>
Add port 80 /
<acronym>
http
</acronym>
firewall rule
</title>
<screen>
sdiuser:~$ telnet 91.107.232.156 80
Trying 91.107.232.156...
Connected to 91.107.232.156.
Escape character is '^]'
</screen>
<para>
Congrats: External Browser access is working now!
</para>
</figure>
<figure
xml:id=
"sdi_hetzner_getstarted_cleanUp"
>
<title>
Cleaning up!
</title>
<caution>
<para>
This is about
<emphasis
role=
"red"
>
$$$ MONEY
$$$
</emphasis></para>
</caution>
<itemizedlist>
<listitem>
<para>
Delete your server including the IPv4 address.
</para>
</listitem>
<listitem>
<para>
You may delete your firewall
</para>
</listitem>
</itemizedlist>
</figure>
</section>
</chapter>
This diff is collapsed.
Click to expand it.
Doc/lectures.xml
+
2
−
0
View file @
2ec9a429
...
...
@@ -169,6 +169,8 @@
<xi:include
href=
"Sdi/Package/package.xml"
xpointer=
"element(/1)"
/>
<xi:include
href=
"Sdi/Hetzner/gettingStarted.xml"
xpointer=
"element(/1)"
/>
<xi:include
href=
"Sdi/GettingStarted/gettingStarted.xml"
xpointer=
"element(/1)"
/>
...
...
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