manual
Obtain and configure the content delivery network
A cache is a data copy. An example: a server serves an image; a cache server copies the image. A content delivery network (cdn) is a set of cache servers; they then serve the cached data. In the instruction, BunnyCDN caches images to reduce load time and requests to the server.
Required inputs
- domain email address
- server
Instruction set
- Create the BunnyCDN account using the domain email address.
- Verify the domain email address to BunnyCDN.
- Set billing information.
- Set name.
- Set billing email to the domain email address.
- Set billing address to the debit card address.
- Recharge (fund) the account.
- Set the amount.
- Enter debit card.
- Pay the amount.
- Create the pull zone.
- Set pull zone name to the domain.
- Set origin to the protocol and root domain (e.g. https://domain.org).
- Set tier to standard tier.
- Select applicable zones.
- Add the pull zone.
- Set images to BunnyCDN addresses.
- Open a shell.
- Change to the private tinyshop repository server directory:
tinyshop/server
.
- Open offering.csv in a text editor.
- Replace classification_cover_image values with corresponding BunnyCDN addresses. For example, replace
/assets/offer.png
with https://domain.b-cdn.net/assets/offer.png
replacing domain with the pull zone name.
- Replace classification_images values with corresponding BunnyCDN addresses. For example, replace
/assets/offer.png;/assets/offer2.png
with https://domain.b-cdn.net/assets/offer.png;https://domain.b-cdn.net/assets/offer2.png
replacing domain with the pull zone name.
- Execute
git add .
to add the files to the staging area.
- Execute
git commit -m "Implemented BunnyCDN offer images."
to commit the files to the repository.
- Execute
git push origin master
to push the commit to the GitHub private tinyshop repository.
- Pull the GitHub private tinyshop repository to the server.
- Open a secure shell on the server.
- Change to the tinyshop directory.
- Execute
git pull origin master
to pull the GitHub private tinyshop repository to the server.
- Activate the virtual environment.
- Execute
python administrate.py
. In this instance, the BunnyCDN image addresses are added to the database.