Chapter 11: Application Hosting — WordPress, Flask and Express
Practice Questions and Lab Exercises
Come on, now practice! Run the temporary local exercises for WordPress, Flask and Express. Use the release rehearsal to verify the intended app and preserve the neighboring routes.
चला, आता प्रॅक्टिस! WordPress, Flask आणि Express साठी तात्पुरत्या local labs करा. Release च्या सरावात निवडलेलं app तपासा आणि आजूबाजूच्या site routes नीट चालतात का ते बघा.
चलो, अब प्रैक्टिस! WordPress, Flask और Express के अस्थायी local labs करो. Release के अभ्यास में चुना हुआ app जाँचो और पास की साइटों के routes सही चल रहे हैं या नहीं, यह देखो.
- Plan WordPress on a supported PHP and database stack. Describe the correct public frontend, configuration, permissions and a representative test.
- Explain how the active Apache rewrite policy or Nginx fallback can route a WordPress permalink to the application.
- Given an actual denial on an enforcing host, identify the process, operation and path before choosing the smallest approved policy change.
- Why shouldn't you use the Flask development server in production? What does
wsgi:appmean? - Explain the Nginx
location /static/block withalias. - Explain the PM2 process model and compare restart with cluster reload. What other tests would verify actual availability?
- Use local WordPress to publish a harmless test post and compare its presence with the actual upload covered by the exercise.
- Draw the Nginx, PHP-FPM and database connections and label each worker and access boundary before proposing a hosted setup.
- Run the local Flask and Gunicorn lesson. Verify the useful route and observe the worker replacement on its private socket.
- Use the private Express and PM2 lesson to verify a named restart under an isolated process manager. Distinguish that test from machine startup.
Got it? WordPress, Flask and Express – three apps, but one pattern: the app, a process manager and Nginx in front. Now let's move on to complete stacks.
समजलं का? WordPress, Flask आणि Express – तीन ॲप्स, पण पॅटर्न एकच: ॲप, प्रोसेस मॅनेजर आणि समोर Nginx. आता पुढे जाऊया पूर्ण स्टॅक्सकडे.
समझ आया? WordPress, Flask और Express – तीन ऐप्स, पर पैटर्न एक ही: ऐप, प्रोसेस मैनेजर और आगे Nginx. अब आगे चलते हैं पूरे स्टैक्स की तरफ़.
Quick Revision
- WordPress uses an approved PHP frontend and compatible database. Verify named publishing, media paths and a full recovery set.
- Flask uses the intended Python environment and WSGI app target. Set the worker and supervisor configuration for the workload, then test both private and public paths.
- Express runs inside Node. Verify the actual runtime and process supervision, then the named app route through the configured frontend.
- When SELinux is enforcing, inspect the relevant denial and actual policy before requesting a targeted change.
Prove a release on a shared frontend with a separate check for each app
Mauli Dairy runs three small sites. Its WordPress notice board shows a public pickup announcement and a downloadable notice. Its Flask schedule tells riders when east pickup opens. Its Express lookup is due for a new release. All three use the same shared frontend in the project drawing. The operating request is narrow. Verify the expected version and opening time from the new Express release and preserve the neighboring routes and their content.
This capstone uses the local WordPress, Flask and Express lessons as evidence building blocks. Here you will design the checks, run a separate loopback rehearsal of shared-host routing, reject a bad candidate, and decide what would let a real launch proceed. The local model uses Python’s standard library to represent the named frontend and recognizable service responses. It does not operate the three real applications at once. Their actual runtime tests belong to the individual exercises.
Make an evidence notebook with columns for test route, expected response, current observation, result after a change and owner. Start with a known article and media, a known Flask schedule and the intended Express lookup for release v2. Decide how you would identify a wrong application response that still returned 200. Keep the exact hostname, scheme and path associated with each result, including whether you used a scoped override. Decide which checks would go through the normal public route during an authorized deployment.
All the names in this lesson are reserved training names. You can run the integrated fixture without registering them, editing a system hosts file, opening a public port or changing another service. The endpoint and evidence live on your computer. The production-shaped steps are planning tasks. Do not use them to justify a reboot or deployment outside the approved setup.
Exercise 1. Draw the application boundaries and backup scope
Make three rows titled WordPress, Flask and Express. For each row, state which code handles the customer request, what runtime executes the code, which component accepts the public request, and which manager controls the local process if one is needed. Add a column for persistent business data. Keep the names used in the environment distinct from people’s sign-in accounts. An editor’s WordPress role is not the operating-system account that runs PHP.
Worked application and persistence inventory
For the WordPress notice board the public server selects the hostname and routes dynamic requests to the configured PHP handler. WordPress reads the stored post data and returns a rendered page. Uploaded files can live separately from the database and have a distinct retrieval route. The backup needs required files, database and protected configuration consistent with the deployment. Track the actual PHP-FPM pool or other PHP handler, not a presumed Linux account from another system.
For Flask the public frontend can forward requests to a private Gunicorn WSGI endpoint. Gunicorn imports the intended application and manages its worker pool. The service manager can supervise the Gunicorn master according to its own policy. For Express, Node hosts the JavaScript and Express routes. PM2 can supervise the selected Node process under the configured runtime and user. If either service writes durable data, that store needs its own access, recovery and version considerations. Process memory is not a durable backup.
The request changes only the Express release and its scoped route if needed. Still inventory the WordPress and Flask routes so you can prove they are preserved. Back up the in-scope frontend configuration and record the previous compatible Express artifact and environment. Separate public routing changes from data changes. Document the scope of any independently managed backup. A copy of a service directory does not prove the database or external files are included.
Mark which credentials belong to which layer without writing their values. A PHP worker may read approved database details. Node startup can get approved configuration from its own context. A TLS listener may have a private key the backend does not need. Keep backups and logs restricted accordingly. Have a partner choose one potential leak and describe the minimum test or redacted metadata that lets them verify configuration without seeing confidential values.
Exercise 2. Recover the published notice and its file
First follow the exact local WordPress activity from the WordPress lesson or its browser Playground alternative. Record a baseline whose post title is unique enough to identify and whose test media is intentionally harmless. Confirm both resources before temporarily withholding only the lab’s own uploaded file in the controlled exercise. Then confirm the post remains and restore the original upload. Transfer the actual observations into two separate rows of the notebook.
As a paper extension, plan a typical self-hosted WordPress recovery from an earlier backup. Identify the approved database recovery target, the relevant themes and plugins, protected config and media ownership. Draw which files the web server and actual PHP worker need to read and which folders the approved media workflow may write. State whether the storage is local or external. For a shared host, do not assume the application processes can write all assets or that one recursive ownership adjustment belongs to this exercise.
Worked WordPress recovery evidence
Verify the public article and its linked file independently. A post marker proves the content was recovered in that environment. The bytes or visible media response provide a distinct recovery check. Confirm site address and a known permalink because a backup can reintroduce old absolute links or a different frontend path. Repeat a representative editor workflow privately if its authorized role and production-like configuration are part of acceptance.
Use the current PHP and database requirements. The setup can be Apache plus a configured PHP handler, Nginx plus PHP-FPM or another supported deployment. A current frontend and an available database are separate requirements. Check the actual endpoint rather than logging into another database as an administrator just because that login works. Approved backup and restore should use the actual scope, access policy and intended destination.
Choose a recovery action based on what failed. If post text is visible but the upload is missing, inspect the media path before considering a full database restore. If restore supplied the database and image but a pretty permalink is wrong, inspect frontend routing before recopying data. Follow the smallest evidence-backed repair that preserves other state. A staging restore with WordPress Playground does not establish the recovery of a production MySQL system, but it can teach the difference between application content and files.
Exercise 3. Prove the Flask control route and the correct process layer
Use the Flask and Gunicorn lab to observe a working private response and controlled worker replacement. Write expected status, release marker and schedule for east. Identify the import target and the exact Python environment that runs it. Record the controlled unknown location as a separate route test. Explain why you would keep the private socket state separate from the named frontend path in a larger controlled release.
As a follow-up question, the frontend returns 502 but a development shell can import the module. Which test is missing? Sketch the service manager, Gunicorn master and actual worker using explicit names. Mark which component could restart which process and whether it can guarantee application readiness. If you plan to use systemd in production, write a private service identity, specific working directory, virtual-environment executable and defined startup or failure policy. None of these need a global file edit for the practice task.
Worked Flask comparison
A successful import in a developer’s shell says nothing yet about the app’s expected private listener or the service manager’s environment. First verify the exact interpreter, working directory and import target under the intended service configuration. Then test a meaningful local request and check its response. A 502 from the public frontend can mean it could not use the configured backend. After proving the private app can answer, check that the named frontend chose the intended upstream and had access to it.
Readiness tells a defined smaller story. The worker replacement lab establishes that the verified Gunicorn child exited and a different worker answered under the ongoing master. It does not prove requests in flight would finish during a production transition. It also does not prove the public reverse proxy path. In the final shared-host rehearsal, the Flask row is a control for our narrow Express change. Its known marker and time should stay the same before, during and after the simulated switch.
Something in the recorded plan may point at the wrong service port or Unix socket even if both programs are running correctly. Use the first differing test to locate the setting. Avoid editing application code to handle a request it never received, and avoid changing the public DNS because a specific backend returned a deliberate 404 for a misspelled path. Use logs matched to the same method, host, path and time.
Exercise 4. Verify the Express API and the release marker separately
Use the Express and PM2 lab to record one expected valid lookup and three kinds of invalid or unsupported requests. For one request explain what JSON text is sent, which method and path the client uses, how the data becomes JavaScript, and which result it gets. Compare the successful east time with a malformed JSON body, a numeric field and an unknown point. Extra practice compares the application and frontend body limits in a controlled setup.
Now write the deployment inventory for the new Express version. Include the approved Node LTS runtime, locked dependencies and intended runtime configuration. In a real candidate build use the reviewed lock and script configuration. PM2 has a named application, its own process and control state, and approved OS identity. Try the named restart only in the private lab instance or applicable approved deployment. Record a new process and expected marker. A status column that says online does not establish that your intended new code is receiving the request.
Worked Express release test
A correct version marker such as v2 is useful but insufficient for the current lookup. Verify the returned business field. The fixture on this page will deliberately present v2 with the wrong time. An acceptance test that checks only status or version would let the bad candidate pass. The reversible plan starts with the current known service, checks the candidate, and returns to the compatible baseline if its useful result is wrong.
PM2 startup and cluster availability answer different questions from the local restart. The app manager can reload a process with its intended environment when configured. Machine startup requires an approved startup integration and intended saved process state. A compatible cluster can use a reload that aims to preserve service but still needs evidence for actual operations and failure cases. This exercise operates one simulated frontend and shows no claim about clustered uptime or real boot recovery.
Prepare a negative test that is supposed to be rejected. A valid release should still correctly respond to a malformed request, unknown pickup name or bad data shape. Use safe output handling if a browser displays content from an outside request. A correct success status with the wrong value should distinguish an app data or selection error from a problem such as an unreachable upstream. Pair the control case with the original visitor’s exact operation.
Exercise 5. Rehearse a scoped release and rejected candidate on loopback
Run the following block using Python 3. It starts one temporary frontend on your computer. The code chooses a simulated app from the request’s Host and path. Two neighboring sites provide controls, a known notice and upload plus a fixed schedule marker. The Express response changes as the program rehearses the release steps. There is also a deliberate unknown host that receives a controlled 404. Every HTTP exchange is real within the local fixture. The application responses and deployment state are intentionally modeled, so the exercises in sections 2 through 4 supply separate actual framework evidence.
Predict four phases before running the script. Start with the known collection time and release v1. Try a v2 candidate that returns the expected version and a wrong time. Restore the previous known version through the same frontend. Then test a corrected v2. All four phases should leave the notice body, attached file bytes, Flask marker and unknown-host policy intact. The exercise compares the file’s digest so a successful request with different content would trigger a failure.
python3 - <<'PY'
from contextlib import ExitStack
from hashlib import sha256
from http.client import HTTPConnection
from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer
from pathlib import Path
from tempfile import TemporaryDirectory
from threading import Thread
blog = "blog.dairy.example.test"
schedule = "schedule.dairy.example.test"
lookup = "lookup.dairy.example.test"
routing = {"lookup_release": "v1"}
class RehearsalFrontend(BaseHTTPRequestHandler):
def do_GET(self):
route = self.headers.get("Host"), self.path
if route == (blog, "/notice"):
status, body = 200, b"DAIRY NOTICE\n"
elif route == (blog, "/notice.txt"):
status, body = 200, upload.read_bytes()
elif route == (schedule, "/pickup/east"):
status, body = 200, b"FLASK CONTROL: EAST 16:00\n"
elif route == (lookup, "/lookup/east"):
status, body = ({
"v1": (200, b"EXPRESS v1: EAST 16:00\n"),
"bad": (200, b"EXPRESS v2: EAST 19:00\n"),
"v2": (200, b"EXPRESS v2: EAST 16:00\n"),
})[routing["lookup_release"]]
else:
status, body = 404, b"NOT AN APPROVED ROUTE\n"
self.send_response(status)
self.send_header("Content-Length", str(len(body)))
self.end_headers()
self.wfile.write(body)
def log_message(self, *args):
pass
def request(server, host, path):
connection = HTTPConnection("127.0.0.1", server.server_address[1], timeout=3)
try:
connection.request("GET", path, headers={"Host": host})
response = connection.getresponse()
return response.status, response.read()
finally:
connection.close()
with ExitStack() as scope:
folder = Path(scope.enter_context(TemporaryDirectory(prefix="hosting-acceptance-")))
upload = folder / "notice.txt"
upload.write_bytes(b"NOTICE DOWNLOAD ORIGINAL BYTES\n")
digest = sha256(upload.read_bytes()).hexdigest()
server = scope.enter_context(ThreadingHTTPServer(("127.0.0.1", 0), RehearsalFrontend))
worker = Thread(target=server.serve_forever, daemon=True)
worker.start()
scope.callback(worker.join, 5)
scope.callback(server.shutdown)
def controls():
assert request(server, blog, "/notice") == (200, b"DAIRY NOTICE\n")
file_status, file_data = request(server, blog, "/notice.txt")
assert file_status == 200 and sha256(file_data).hexdigest() == digest
assert request(server, schedule, "/pickup/east") == (
200, b"FLASK CONTROL: EAST 16:00\n"
)
assert request(server, "unknown.dairy.example.test", "/") == (
404, b"NOT AN APPROVED ROUTE\n"
)
assert request(server, lookup, "/lookup/east") == (200, b"EXPRESS v1: EAST 16:00\n")
controls()
print("Baseline and three named-service controls passed.")
routing["lookup_release"] = "bad"
bad = request(server, lookup, "/lookup/east")
expected = (200, b"EXPRESS v2: EAST 16:00\n")
assert bad == (200, b"EXPRESS v2: EAST 19:00\n") and bad != expected
controls()
print("Rejected candidate: 200 and correct version, wrong pickup time.")
routing["lookup_release"] = "v1"
assert request(server, lookup, "/lookup/east") == (200, b"EXPRESS v1: EAST 16:00\n")
controls()
print("Returned to the known release; neighboring services still passed.")
routing["lookup_release"] = "v2"
assert request(server, lookup, "/lookup/east") == expected
controls()
print("Corrected candidate passed; original notice digest stayed the same.")
assert not worker.is_alive() and not folder.exists()
print("Temporary listener and uploaded fixture removed.")
PY
Read the first line as baseline evidence. It says the intended v1 operation and the shared-site controls match expectations on this fixture. The next line deliberately rejects a 200 with a v2 marker, because a rider would be told 19:00 instead of 16:00. The result should prompt a scoped return to the known previous route, leaving unrelated applications available. The corrected v2 then produces the expected time and it is safe to compare it with the original content controls again.
The upload assertion compares a SHA-256 digest of the initial local test bytes with the digest of the served bytes. A digest is a compact value computed from the input. Matching is useful here as evidence that the particular file content did not change. The code creates the file in a temporary directory and does not reuse or delete any user media. The direct HTTP connection uses loopback and explicit reserved Host values, so the outcome does not depend on public DNS ownership. Verify TLS and the public customer path separately in a real deployment plan.
For a controlled variation, change the simulated Flask marker in the handler without changing the expected marker in the controls. Predict that the earliest controls check now fails, even if the Express target behaves properly. Restore that marker afterwards. This shows why the approval condition includes unaffected services, and it ensures the checks do more than report every trial as passing. If an assertion fails, read which step was attempting the comparison. The context cleanup stops the owned listener and removes the owned test files regardless of that exception.
Exercise 6. Map the local rehearsal to the actual frontend
Draw the public hostnames and the TLS listener for each app. Each can share one frontend while mapping to a different service. WordPress might forward PHP through FastCGI to the right pool, Flask might proxy to a Gunicorn socket, and Express might proxy HTTP to a private Node listener. Write the exact path and method on each arrow. Check how a static request is routed, because it may never touch the application whose process you are testing.
A partner proposes changing the default public site so they can see a nice page at the IP. Explain what new risk that introduces and how to test the intended app instead. The IP can choose a fallback route different from the real named sites. A change to global defaults could affect multiple hostnames. Test an actual reserved or approved named candidate route under the scope that matters, verify certificate behavior when using HTTPS, and keep a known control for other intended services sharing the frontend.
Worked public route and configuration check
I would inventory the current in-scope configuration and run the candidate through its normal configuration validation. Then check exact named routes at the candidate listener, using an approved override if needed. Look for expected site or application content and for absence of the default page. Test one unknown host and an independently approved control path. A syntax pass establishes that configuration can be interpreted, not that the new public request chooses the right route.
For the public check, use the intended hostname, ordinary DNS and certificate verification and an exact application operation. If a proxy rewrites a path or supplies trusted original scheme information, test the actual route and any generated redirect. Public TLS and a separate internal connection can use different transport settings. Keep the neighboring WordPress and Flask outputs and protected file evidence as scope checks rather than modifying them during the Express release.
When the public response fails but the private check succeeds, compare the selected frontend, host rule and upstream. The useful next observation is the earliest mismatch. If the public result is 502 and no app log exists for the request, identify the frontend’s selected connection and error before trying a new app release. If the response reached the app but included the wrong time, inspect the candidate code and data path instead.
Exercise 7. Write a release gate and a safe return path
Suppose the actual new Express release is prepared in a distinct directory with the reviewed dependency lock and correct Node runtime. The manager wants to switch it tonight. Produce a short gate with a baseline, candidate tests, a clear stop condition, the smallest permitted switch and a compatible return path. Include owners for the app, public listener and durable data. Make the other two applications explicit controls rather than treating them as part of the release.
Make sure the old release and in-scope configuration can be recovered. Confirm what assumptions are required to use the older artifact again. If the candidate is allowed to modify data, the previous release must be able to read those contents or you need a different recovery plan. Restoring an older database can discard activity recorded after its backup. Discuss with the data owner how to preserve useful later records. A good smoke check exercises the actual operation the site provides without adding test customer data to a live system.
Worked release gate and return decision
Capture the expected east output under the known current release, the WordPress article and notice and the Flask route marker. Stage the candidate build and verify the intended runtime and PM2 manager instance. Check a known lookup and the controlled errors privately. Test the named candidate route separately. The proposed release is accepted only when the correct active marker and time match and the controls retain their expected results. Keep one explicit check for the original posted links.
If the candidate returns 200 with the wrong time, the version label is insufficient. Stop the change according to the scoped return plan. Set the approved application back to its compatible previous artifact or route, then verify the same visitor lookup and all relevant controls. A status changed in the manager does not complete the restore. Verify the candidate’s data dependencies and repeat direct and ordinary path acceptance for a corrected version.
If a dependency is shared, verify that no unrelated virtual host or service needed a change. Leave older backups and artifacts available according to the approved retention policy. Record actual switch time, previous and current version, corrected resource and whether public observation was made. If a scope or permission question remains unanswered, stage the evidence and direct the decision to its owner.
Exercise 8. Choose what a startup rehearsal can claim
Make two rows for an application process restart and an operating-system restart. Describe one effect and one required observation for each. The local Gunicorn exercise replaces an application worker while its master stays running. The Express exercise performs a named restart inside an isolated PM2 home. Neither is a reboot test and neither claims cluster availability. A genuine machine startup rehearsal needs approved access to a dedicated environment and an agreement about the interruption.
For an actual Linux service, record the intended unit, user, working directory and runtime executable. If the unit is enabled or the PM2 application list is saved, explain what each configuration can and cannot prove on its own. First inspect the configuration and local response. Then rehearse startup only on the approved environment where the relevant integration is installed. Ask both the app and host owners what evidence they need from the new process, private listener and public route.
Pick one failure: the app starts at boot but returns an old artifact, there is no private listener, or the public host reaches a fallback page. After naming the failure scope, propose the next controlled observation. Compare the reported version with the persisted startup configuration, listener with the expected upstream, or fallback marker with the actual named site rules. Avoid rebuilding every app or rebooting a service twice just to see if a problem disappears.
Exercise 9. Compare identity, body limits and persistence in a scoped worksheet
A real deployment review benefits from showing how multiple size and access decisions fit a request. The intended WordPress editor should upload a harmless image below the chosen limit. A rider should make a small Express lookup with a valid pickup field. A public schedule reader should request an approved Flask page without modifying a stored order. Write these as distinct operations with a role, input, expected response and persistent consequence. Only the upload changes the storage in this particular exercise.
Now add the expected errors. The WordPress operation might be rejected by the edge, PHP or app policy if the file exceeds its intended limits or the editor lacks the right role. A JSON endpoint can receive a body rejected by the frontend before it reaches Express, or Express can reject it according to parsing and business validation. A missing Flask location should carry its intended status. These are useful negative controls as long as the test covers a harmless request and clearly identifies which stage made the decision.
Worked evidence for a rejected request
Write down who made the decision and what information that component had. The edge can know the request length and destination route. PHP can enforce its own upload and request limits. WordPress checks the editor’s permissions and application rules. An Express parser can reject malformed JSON before business logic, while the lookup route can reject a type or unrecognized value after parsing. Use the serious-looking status in context. A deliberate 413 from a fixture can be a passed check if that is the expected limit. A different unexpected stage returning the same status calls for transport and logging evidence.
Keep acceptance tied to a normal supported request as well. If many clients are unable to upload even harmless files below the intended limits, the service has a separate problem from a useful negative control. Compare the observed response in the normal browser path and the authorized candidate. See whether the actually serving configuration matches the intended release. Avoid loosening all inspection and application limits when the original goal names one operation and an approved maximum.
For the safe lookup, the receiving route produces a current approved result without changing an actual order. A controlled 404 for an unsupported pickup point should leave application state intact. The expected WordPress operation should create its own test content and its corresponding file in the dedicated rehearsal only. After the exercise, verify that only scratch pieces were removed. Do not erase application media or service accounts that were present before the exercise.
Teach this back using one small task. Have another student write a harmless JSON example with a 400 caused by the field type. Ask them to distinguish it from a syntax error and to write the intended body. Then ask them to list which log can establish whether the request reached Express at all. Their reasoning should survive a change of framework because the contrast is based on observed request stages and data.
Exercise 10. Assign the next confirming test for three failed release reports
Report A says “everything passed” with the output of a frontend config syntax check attached. The original test was an HTTPS lookup whose business output needed to change. On your worksheet, call the syntax result an observation about the candidate’s configuration, then add the missing private and public route tests. A working private route with a failing public host calls for examining the frontend, DNS and TLS path. An incorrect business field through both calls for the application and its data. Write the expected version and actual time independently so a future reader knows what failed.
Report B says the new lookup works, but the WordPress notice’s file no longer matches the original control. Choose a stopping condition that treats the changed file as release evidence. The request did not authorize changing it. Compare the control’s original bytes or digest and the route serving that file. Determine whether a shared config or root pointed to another version, whether the media source changed, or whether the wrong hostname produced the result. Use the scoped return procedure for the approved release while preserving the evidence of the unexpected change. Do not assume the old and new file mean the same thing because both returned 200.
Report C says a machine startup restored an earlier app version after a correct candidate was previously observed. Trace the actual service owner, process manager store, runtime and saved project. Separate a reboot result from an ordinary process restart and inspect what the OS integration used. The service may have restored a saved list with the old directory or configuration. If another path still uses a new version, compare each private and public route. Ask who can update the intended persistent boot configuration and how their change will be verified separately.
Give each report a short next-action ticket. It should list an owner, one read-only observation to obtain next, and the expected operation used to verify success. Include the prior actual result and which environment it came from. No one should need access to the production system to learn why each report is incomplete. The point is to give a handoff precise enough that the authorized operator can test it without touching unrelated projects.
Discuss what happens when you lack one piece of evidence. If you do not know which external endpoint terminated TLS, state that as a remaining variable. If you have never observed the site with the customer’s role, distinguish what your anonymous or local test showed. If the service uses a managed platform whose logs you cannot read, identify the owner and ask for a scoped observation. You can still write a conditional release decision and preserve current independent facts without guessing.
Exercise 11. Deliver a compact handback for another operator
Put your final version into three short paragraphs and a small comparison table. Begin with the requirement and scope of the actual application change. Describe the simulated result of the rejected v2 and the scoped return to v1. Give the corrected result and the controls you verified. For tests that took place in the exact local apps rather than the integrated model, use those labels so someone can distinguish real application execution from the invented shared-frontend responses.
Next state the public deployment evidence you would still need. It can include an authorized TLS listener and ordinary DNS verification, the actual candidate runtime and app operation, approved persistent recovery, and any boot behavior the business needs. Reinforce the control site acceptance. No new change to its services belongs in scope merely because it shares a listener. If the actual deployment needs a frontend configuration change, preserve the original and name the precisely approved route. If a restore affects later content, involve the data owner explicitly.
End by writing one retirement condition for the training work and one for a real release. Delete scratch code, ephemeral processes and files created for the exercise after preserving safe evidence. Keep the current approved recovery assets and backups according to the intended release retention. Do not remove another account’s processes or a shared simulator used by others. Confirm the lab’s final output and the absence of its temporary listener and directory. A complete operator can explain what evidence was taken before and after cleanup.
Give the handback to a partner who has not watched the code run. Ask them to reproduce the first useful test and point out which parts would require real service access. They should also be able to describe the expected app marker and business value without reading the source. If their interpretation of “the new version works” is still ambiguous, add the full URL, route and output, then repeat the review.
Add a column for a test whose result could change your launch decision. A known upload matching the original digest can clear a concern about changed file bytes. A confirmed earlier Express version under the actual v2 route can stop the change. A valid static response does not override the selected app failure. Choose comparisons that can disprove your assumptions rather than collecting more screenshots of results that happen to be green.
Revisit one expectation a day later with a fresh teaching scenario. Suppose the editor has legitimately changed the WordPress notice after the baseline was taken. Determine whether an updated marker is now the correct control and how the content owner will document it. A control must distinguish an approved normal business change from an accidental release side effect. Refresh it consciously, then save when and why the expected criterion changed.
Explain your decisions before checking the worked answers
How do you test whether a shared-host release respected its scope?
Verify the intended customer operation and release, then repeat the specified controls for other approved hosts. Compare relevant config and listener choices. A correct target response with a changed control is still evidence of a scope problem.
Why preserve files and a database separately for WordPress?
The content and settings in a typical installation live in its database. Uploaded files and required deployment config can live elsewhere. Verify both in a consistent recovery rehearsal.
How do you decide a Flask worker replacement worked?
Verify the replacement under the intended master and repeat the representative route. Worker replacement is a process result. A public acceptance check and sustained availability require separate evidence.
Is it enough to see an Express process running after a release?
No. Check the actual host, route, status, version and business response. A process can be online and serving old code or wrong data.
What might prevent a previous app release from being a valid rollback?
Incompatible schema, newer media or settings, changed dependencies, or a changed public route. Verify the complete combination and protect later data before promising a return.
Review the gate with five checks
The candidate status and version match, but the pickup time is wrong. Does it pass?
Answer and reasoning
No. The expected business result is part of acceptance. The capstone deliberately rejects this case and restores the known release before reconsidering the corrected candidate.
The WordPress title works after restoring from backup. Which test proves more about the media?
Answer and reasoning
A request to the actual linked file and comparison of expected bytes or visible content. Stored article text does not establish the upload is available.
The Flask private request succeeds, but the public response is a generic page. What first?
Answer and reasoning
Compare the exact named route, actual public endpoint and selected virtual host or path. A working local socket does not prove how the customer found it.
A PM2 startup entry is configured. Where else would you check before claiming boot recovery?
Answer and reasoning
Inspect the intended account, runtime and saved app state, then practice approved startup and verify the operating response. The local restart is a smaller test.
Which cleanup applies to the integrated lab?
Answer and reasoning
The temporary listener, thread and upload file created by the fixture. It does not change any account, real frontend, database, or application service.
Cards for independent hosting practice
Known useful operations
Write a named route, expected status and actual content or outcome. Record which observations belong to a local candidate.
One controlled release
Identify the exact target runtime and service. Preserve neighboring routes, relevant configuration and durable data.
Compatible path back
Keep the earlier reviewed artifact and config. Verify data compatibility and run the original acceptance tests after returning.
Data versus process
Restarting a program can replace its memory. Verify durable records, uploads and database recovery independently.
Observe after cleanup
Stop and remove only practice-owned resources. Verify that intended applications and their records remain in the planned state.
Official references
- WordPress hosting requirements
- WordPress backup scope and recovery
- WordPress Playground practice workflow
- Flask deployment guidance
- Gunicorn worker lifecycle
- Express error handling
- PM2 process management
- PM2 machine startup configuration
- npm installed lockfile dependencies
- Nginx proxy behavior
- Python local HTTP fixture interfaces
- Python digest APIs