Table of Contents
Setup the ACI Simulator
Go to the session overview and click on the “acisim” and “VM Console”
A new browser window will open and please follow the setup wizard as shown in the following screenshot:
Attention
The only settings that needs to be done are the IP, Gateway and password
IP address: 198.18.134.11/18
Gateway: 198.18.128.1
Password: C1sco12345
IP address: 198.18.134.11/18
Gateway: 198.18.128.1
Password: C1sco12345
Go back to the Windows RDP session and open the Chrome browser. The page should already be loaded and displays a timeout. Refresh the page. You should see the APIC login screen
Congratulation the first step is done!
Configure the Ubuntu machine
During this task we will install the following services:
- Ansible with the aci collections
- Docker
- GitLab server
- GitLab runner
Install some basic packages
sudo apt install -y python3-pip ca-certificates curl openssh-server tzdata git net-tools
Install Ansible and the ACI collection
sudo python3 -m pip install ansible paramiko lxml xmljson
sudo ansible-galaxy collection install cisco.aci
cisco@ubuntu:~$ ansible --version
ansible [core 2.13.2]
config file = None
configured module search path = ['/home/cisco/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/cisco/.local/lib/python3.8/site-packages/ansible
ansible collection location = /home/cisco/.ansible/collections:/usr/share/ansible/collections
executable location = /home/cisco/.local/bin/ansible
python version = 3.8.10 (default, Jun 22 2022, 20:18:18) [GCC 9.4.0]
jinja version = 3.1.2
libyaml = True
Install Docker
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin
cisco@ubuntu:~$ docker --version
Docker version 20.10.17, build 100c701
Install GitLab server and GitLab runner
curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash
curl -L "https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.deb.sh" | sudo bash
sudo apt install -y gitlab-ce gitlab-runner
sudo mkdir -p /var/lib/gitlab-runner/builds
sudo chown -R gitlab-runner:gitlab-runner /var/lib/gitlab-runner
Ubuntu 22.04 (not relevant for the lab)
sudo apt install curl debian-archive-keyring lsb-release ca-certificates apt-transport-https software-properties-common -y
gpg_key_url="https://packages.gitlab.com/gitlab/gitlab-ce/gpgkey"
curl -fsSL $gpg_key_url| sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/gitlab.gpg
sudo tee /etc/apt/sources.list.d/gitlab_gitlab-ce.list<
Coffee break number 1! ☕️
*. *.
*** ***
***** *****
.****** *******
******** ********
,,,,,,,,,***********,,,,,,,,,
,,,,,,,,,,,*********,,,,,,,,,,,
.,,,,,,,,,,,*******,,,,,,,,,,,,
,,,,,,,,,*****,,,,,,,,,.
,,,,,,,****,,,,,,
.,,,***,,,,
,*,.
_______ __ __ __
/ ____(_) /_/ / ____ _/ /_
/ / __/ / __/ / / __ `/ __ \
/ /_/ / / /_/ /___/ /_/ / /_/ /
\____/_/\__/_____/\__,_/_.___/
Thank you for installing GitLab!
GitLab was unable to detect a valid hostname for your instance.
Please configure a URL for your GitLab instance by setting `external_url`
Fixing the Hostname & reconfigure
sudo sed -i "s%http://gitlab.example.com%http://198.18.134.28%" /etc/gitlab/gitlab.rb
sudo gitlab-ctl reconfigure
Coffee break number 2! ☕️
Running handlers:
[2022-08-09T15:05:47-04:00] INFO: Running report handlers
Running handlers complete
[2022-08-09T15:05:47-04:00] INFO: Report handlers complete
Infra Phase complete, 604/1615 resources updated in 04 minutes 55 seconds
Notes:
Default admin account has been configured with following details:
Username: root
Password: You didn't opt-in to print initial root password to STDOUT.
Password stored to /etc/gitlab/initial_root_password. This file will be cleaned up in first reconfigure run after 24 hours.
NOTE: Because these credentials might be present in your log files in plain text, it is highly recommended to reset the password following https://docs.gitlab.com/ee/security/reset_user_password.html#reset-your-root-password.
Getting the root password
sudo cat /etc/gitlab/initial_root_password
# WARNING: This value is valid only in the following conditions
# 1. If provided manually (either via `GITLAB_ROOT_PASSWORD` environment variable or via `gitlab_rails['initial_root_password']` setting in `gitlab.rb`, it was provided before database was seeded for the first time (usually, the first reconfigure run).
# 2. Password hasn't been changed manually, either via UI or via command line.
#
# If the password shown here doesn't work, you must reset the admin password following https://docs.gitlab.com/ee/security/reset_user_password.html#reset-your-root-password.
Password: bNl/lzMXZg4HCjWq2P2QwDSxuFyed6hL9I91ma2qGIc=
Copy the password from your output and open the following link: http://198.18.134.28
Attention
Copy the password into a text file! We will need it later