Automation: Git and Ansible / Stage 2 of 6 · step 6 of 7
The server does not pick up changes
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
- The
/srv/shop-configworking copy is at the latest version of themainbranch from the repository. - The on-call engineer's change is committed and pushed to the repository: the developers must see it.
- The developers' changes stay: do not rewrite the
mainhistory, and do not lose their settings inshop.ini. git statusin the working copy is clean.- 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.
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