-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathreactle.md
122 lines (69 loc) · 3.96 KB
/
reactle.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# Part 2: Provision a bare metal server and deploy Reactle with Kubernetes
In this part we'll begin to set up a bare metal server. We'll cover options such as metro locations, server types, and operating system choice.
!!! example "First time seeing the Equinix console?"
If this is your first time in the Equinix console take a few mintues to familiarize yourself with our navigation menu.
## Steps
### 1. Choose your server metro, type, and operating system
From the navigation menu on the left, under the **Bare metal servers** option, click on **On demand**.

Choose a **metro**. We suggest the **Dallas** metro.

!!! note "Did you know...?"
Equinix Metal supports over 20 regions around the world?
Choose a **server**. For our workshop, let's go with a `c3.small.x86` or `m3.small.x86` instance.

!!! question "Open discussion"
* What do c3 and m3 mean?
* What does x86 stand for?
* For more information about server types, see our [documentation](https://deploy.equinix.com/product/servers/).
Choose an **operating system**. We recommend **Ubuntu 20.04 LTS**.

### 2. Configure your server with clout init
Under *Select number of servers* give your server a unique hostname. Then click on **Optional Settings**, and then the **User data** tab.

Copy and paste the snippet of code below into the text box.
```yaml
#cloud-config
runcmd:
- curl -sfL https://get.k3s.io | sh -
- sleep 20
- kubectl apply -f https://raw.githubusercontent.com/stevemar/metal-code-snippets/main/yaml/reactle.yaml
```
!!! question "Open discussion"
* What are cloud init scripts?
* What is this code doing?
Review your settings and click **Deploy Now** at the bottom of the page.

!!! info
This example uses Kubernetes to deploy the sample application. Specifically, it uses [k3s](https://k3s.io/), a lightweight Kubernetes distribution. Kubernetes has quickly become the defacto approach for deploying cloud native applications.
### 3. View server details
From the left navigation, click on **Manage Servers**, it's under the **Bare metal servers** menu. You'll be presented with several details about all the servers you have deployed.
Here you can quickly and easily find information for each server, such as: _hostname_, _server type_, _public IP address_, _status_, _operating system_, and _location_.
Let's now click on the server you just created to get more information about it.

On this page you can do several post-provisioning tasks such as:
* Deleting and rebooting the server
* Viewing inbound and outbound traffic
* Auditing when and who provisioned the machine
Flip through a few sections to familiarize yourself with the overview page.

### 4. Verify the application is running
Click on the **Network** tab and find the public IP address.

Launch a browser and navigate to the following URL:
```
http://<ip-address>:31000
```
You should now be presented with a running application. In this case, the app running is called Reactle, a clone of the popular game, Wordle.

!!! example "Can't access the application?"
If you're unable to access the applicaiton due to network security, try using a personal device, like a phone.
### 5. Clean up any resources
When you've wrapped up this part, don't forget to delete your server.

## Discussion
Before proceeding to the next part let's take a few minutes to discuss what we did. Here are some questions to start the discussion.
* What if we wanted to create 60 servers with 6 different locations?
* What if I want to install my own OS?
* What is an alternative to cloud init scripts?
* Let's go through the code that we copied.