Linux Labs

Automation: Git and Ansible / Stage 2 of 6 · step 6 of 7

The server does not pick up changes

medium ~20 min
Not running Starting usually ~20 s
Report a problem

Situation

The shop settings are the shop.ini file in the shop-config repository. The developers edit it on their machines and push the changes to the /srv/git/shop-config.git repository, and the server picks them up by itself: the lab-shop-deploy service runs git pull in the /srv/shop-config working copy.

Yesterday the developers turned on the new checkout and pushed the change, yet shop.ini on the server still says new_checkout = off. And last night the on-call engineer edited the database settings on the server — the shop could not handle the load. That change is needed.

Task

  1. The /srv/shop-config working copy is at the latest version of the main branch from the repository.
  2. The on-call engineer's change is committed and pushed to the repository: the developers must see it.
  3. The developers' changes stay: do not rewrite the main history, and do not lose their settings in shop.ini.
  4. git status in the working copy is clean.
  5. The server update succeeds again — sudo systemctl start lab-shop-deploy, and the next one will too: the files of the working copy and the repository stay with student.

The working copy and the repository belong to you (student), and the update service runs as student too — run git here without sudo. There is no internet on the machine.

Visible only to you. Saved as you type.

All notes

Lab goals

0 of 5
  • The /srv/shop-config working copy is at the latest main from the repository — not checked yet
  • The on-call engineer's night-time change is committed and is on main in the repository — not checked yet
  • The developers' changes are in place — the main history is not rewritten — not checked yet
  • git status in the working copy is clean — not checked yet
  • The lab-shop-deploy server update succeeds, and the files of the working copy and the repository belong to student — not checked yet

Hints

0 of 3 open · they open one at a time
Hint 1
Show the solution after 3 failed checks

Leave the lab?

The machine keeps running for 10 more minutes, then it is removed. Files are lost; completed goals stay.

Loading…