跟读练习: Install NetBox with Docker on Ubuntu 24.04/22.04 LTS | Ep. 2 - 通过视频学习英语口语
正在创建课程...
1
Still tracking your network inventory in spreadsheets?
2
In this video, we are fixing that.
3
I'd walk you through installing Netbox, which is a powerful modern source of truth for your network using Docker on Ubuntu.
4
This will serve as the single source of truth for our network automation project in this series.
5
By the end, you'd have a clean scalable alternative to messy spreadsheet and a good foundation ready for automation.
6
So this is our Netbox interface.
7
to organize our site, including which regions they are located.
8
We can have multiple tenants on netbox and we can add our racks, devices, connections, power connections, wireless,
9
IPAM, VPN, circuit and all of that.
10
So basically it provides us all that we need to document
11
our network in a single place there are two ways
12
that we can install netbox we can go the manual route
13
where we'll be responsible for installing the various components of netbox
14
so like the database caching redis and all of that
15
so the manual route will do it on our own now this is involving
16
because it gives us that control but because we are starting out we want to get the
17
then we can focus on our actual automation.
18
So in this video, we'd use the Docker version.
19
Pretty simple and straightforward.
20
The various components are pre -configured and packaged as container images.
21
All that we need to do is to pull the repo, define the port on which we want Netbox to listen on,
22
pull the container images, and start the containers.
23
First, you can see just a couple of steps and we are done.
24
And because we'd want to log into Netbox, We'd need to create a user.
25
In our demo today, we'll be installing Netbox using Docker on Ubuntu 24 .04.
26
I have tested this with Ubuntu 22 .04 so it works on both versions.
27
Because we are doing this from scratch, there are dependencies that we need on our Ubuntu server.
28
We need to install Docker and we need Docker Compose.
29
Just a quick note on Docker Compose.
30
version of Docker Compose, but the syntax for that would be docker -compose.
31
Now the newer version is docker space compose.
32
The newer version is available in the official Docker repository, not the Ubuntu repo.
33
What that means is that we have to add the official Docker repo, then we can pull this.
34
So let's get started.
35
In my case, I would use an EC2 instance that is running the Ubuntu 24 .04 OS.
36
So let's open the CLI for this.
37
As you can see the private IP address 172 .31 .4143,
38
that right here, and we'll assess this using the public IP address.
39
So the first thing I'll do right out of the way is to add our Docker repository, because that's where we would pull the Docker Compose.
40
So add the official GPG key for Docker.
41
Then we can add the docker repository.
42
I would make all of these commands available to you, in the video description.
43
Now that we have this out of the way, we would refresh the list of available packages and versions.
44
So we do sudo update.
45
So take just a couple of seconds to run.
46
Once we are done with this, we would proceed to install the latest version of any packages.
47
So we do CD app upgrade.
48
Now we have been asked whether we want to continue on, yes or no. We would say yes.
49
We could have simply passed this ES at the point of running the command.
50
So it will take a while for this to run
51
The reason we did both of these is to ensure that our system is up to date,
52
is secure before installing any new software like Docker.
53
So 98 % progress.
54
We are almost there.
55
In our case, there was a kernel update which will require us to reboot.
56
Because this is a lab or a demo, we could have proceeded without rebooting.
57
A word of caution however, if you are doing this in a production environment,
58
make sure that you are able to reboot the server in case there's running any other services.
59
it will just take a couple of seconds for this to reboot.
60
Let's see.
61
Let's restart our terminal and see if we should put it.
62
So we've rebooted our next step.
63
is to proceed with our installation of Docker and Docker Compose.
64
Okay.
65
So we installed Docker, now we passed the "yes" to it at the point of running the command.
66
Thank you.
67
Now if we had run Docker version before installing this, we would have seen that we wouldn't have Docker installed but now we have Docker. and start.
68
Now we proceed to install Docker Compose.
69
Thank you.
70
Thank you.
71
you All done. So...
72
Docker not okay?
73
Thank you.
74
Look So we are good.
75
Next, we want to ensure that when the server reboots, Docker starts automatically and the service also starts immediately.
76
So we'll say systemctl .com.
77
Enable Docker.
78
and start docker if we check the status We should have the Docker service running.
79
Okay.
80
What we want to do next is that we want to ensure
81
that our current user is able to run Docker commands without SIDO.
82
To do that, we would add a current user to the Docker group.
83
Now if we had done just this, we'd have to log out and log in or reboot before this takes effect,
84
but we want this to take effect immediately.
85
So at this point, we've looked at the dependencies needed.
86
to Yeah, we've looked at the dependencies needed to pull a repo and get going.
87
So our next step, we go and clone the NetBox Docker repository.
88
Thank you. and navigate.
89
So when we do a list, we see the folder here.
90
So we navigate into this folder.
91
And we do list.
92
There are two key files that we need to pay attention to.
93
So the first one is docker -compose .yaml.
94
In this file, we have the services.
95
You can think of these as the images that you'll be pulling from Docker.
96
NetBox, we have the database, caching, redis, and all of that.
97
Then we also need to create a file which defines the port under which NetBox will be available.
98
Basically the port that NetBox will listen to.
99
Now this file must be called specifically dash compose dot override dot YAML.
100
If you look at the list of our files, we don't have that file specifically, but we have an example that tells us how that file can look like.
101
So basically, as we see here, we just have the services netbox and we define the port 8000 and would stick to this.
102
What we'll do next is to actually.
103
write to that file So now if we do a list, we have docker -compose .override .yaml.
104
And if we look into this, It has just what we need.
105
Next step would pull our container images with docker -compose -pull.
106
So it will take about a minute.
107
We are pulling NetBox, we are pulling the database
108
and we are pulling Caching as we saw in the Docker Compose .yaml file.
109
Let's give this a minute.
110
and we should be done good.
111
Now that we have pulled the images, if you do, let's say docker, images we have our images but we don't have any
112
containers running our next step is to start our containers the command we'd use would be Docker Compose
113
We can do this.
114
Let me just give some space so this becomes obvious.
115
Thank you.
116
Thank you.
117
When you do this, we have all the logs show on our screen.
118
The other option is that we can run this in a detached mode.
119
With the detached mode, we can now access to the prompt.
120
I will run it in the detached mode then I'll post it to show you how you can actually check their locks, even their life locks as this runs.
121
This process of starting up the containers will take about
122
five minutes to complete but i would want to
123
you know let it go through
124
the process so that we can see how this works look at the logs and
125
if there are any errors we can take note of them
126
at this point you could have actually exited out of this and check the logs but
127
I would want to wait for about two minutes because there is an error message that
128
you would see or may see and I would want to clarify
129
that so that you are not alarmed when you see that so let's just give this a couple of seconds
130
within two minutes we should see this.
131
You can forward it, about a minute ahead if you can't wait.
132
Thank you.
133
Alright, if you see this arrow, this is still running at the backend.
134
The process of bringing up the container images is still running at the backend.
135
And there are some dependencies that are needed.
136
before netbox actually runs.
137
And we saw that here, right?
138
So we said netbox depends on the database and caching and all of that.
139
We can go ahead and check the logs and see what is happening.
140
So if you do Thank you.
141
Docker Compose Logs Thank you.
142
It will show us their logs, but if you want their live logs as and when it happens,
143
We can add the -f We are still in the process of setting up the various components.
144
I said this will take about five minutes to get done, but I would want us to just wait till we see all that is happening.
145
also in case we run into any errors.
146
Now, if you are taking node, of a netbox interface.
147
So you are seeing virtualization, DCIM, then tenancy, IPAM.
148
This sounds familiar, right?
149
When we went here, we saw all of those.
150
tenancy virtualization ipam so basically at the back end it is setting up all of these components BPMs, wireless, tagging.
151
What we expect to see or cue that everything is okay is that the netbox service is running.
152
So at this point we have not seen it so we are still waiting but they used to fully complete Thank you.
153
Alright, so there we have it.
154
We have our Netbox application started.
155
So we are good at this point.
156
So we can come out of this.
157
And now if you go back to our instance, this is the IP address of our instance.
158
and the port we said was 8000.
159
So there we go, we have our netbox installed, we have our interface, but it is asking us of a username and password.
160
We didn't create one.
161
So that would be our last step so we run this command Thank you to create a super user.
162
It would prompt us for the username, their email address and their password.
163
so a username do packets to purpose Email address then you'd enter your very secured password.
164
confirm the password So our super user has been created successfully.
165
So we go back and we enter our user and our password. So there we go.
166
We have a netbox.
167
Instance fully created from scratch.
168
We don't have anything at this point.
169
There are no regions.
170
There are no sites.
171
We don't have any tenants.
172
There are no devices.
173
Nothing at all.
174
In our next video, we'll look at adding some data into Netbox.
175
So our sites, devices, and all of that.
176
If you found this interesting, kindly subscribe to the channel, hit like and the bell icon so you don't miss any videos.
177
Thank you.
上下文与背景
在今天的视频中,讲述者主要讨论如何在Ubuntu系统上安装NetBox,这是一个现代化的网络管理工具。对于那些还在使用电子表格追踪网络库存的人来说,这个工具提供了一种更为高效且可扩展的替代方案。通过引入Docker,讲述者展示了如何有效地配置网络环境,提供了真实的案例,帮助用户理解网络自动化的基础。这不仅是一个技术指南,也为需要管理网络的用户提供了重要的背景信息。
日常交流的五个关键短语
- Still tracking your network inventory in spreadsheets?(还在用电子表格追踪网络库存吗?)
- This will serve as the single source of truth for our network automation project.(这将成为我们网络自动化项目的单一真实来源。)
- All that we need to document our network in a single place.(我们只需在一个地方记录所有的网络信息。)
- There's two ways that we can install Netbox.(我们可以通过两种方式安装NetBox。)
- We'd want to log into Netbox, we'd need to create a user.(我们需要登录NetBox,因此需要创建一个用户。)
逐步影子跟读指南
要有效提升你的英语口语能力并掌握网络管理相关术语,建议你进行英语影子跟读练习。以下是根据本视频内容为你提供的具体步骤:
- 选择片段:挑选视频中的一段对话,比如讲述如何安装Docker或NetBox的部分。
- 倾听并模仿:集中注意力听讲述者的发音和语调,尝试在心里重复他所说的内容,以提高自己的发音。
- 录音对比:录下你的发音,与原声进行对比,找出不足之处,进行针对性的改进。
- 重复练习:重复上述步骤,尤其是与“网络库存”、“用户创建”等相关的术语,以增强记忆。
- 日常应用:在日常对话中使用你所学的新词汇和短语,这样有助于巩固记忆并提升英语口语流利度。
在练习过程中,记得结合影子跟读(shadow speak)技巧,逐步提高自己的英语发音和口语能力。无论是系统的推导还是日常的练习,持之以恒将会让你的英语口语更加流利和自信。
什么是跟读法?
跟读法 (Shadowing) 是一种有科学依据的语言学习技巧,最初开发用于专业口译员的培训,并由多语言者Alexander Arguelles博士普及。这个方法简单而强大:您在听英语母语原声的同时立即大声重复——就像是一个延迟1-2秒紧跟说话者的影子。与被动听力或语法练习不同,跟读法强迫您的大脑和口腔肌肉同时处理并模仿真实的讲话模式。研究表明它能显着提高发音准确性,语调,节奏,连读,听力理解和口语流利度——使其成为雅思口语备考和真实英语交流最有效的方法之一。