Deploying Static Websites Using OSS and CDN on Alibaba Cloud

Prerequisites

Architecture

Implementation

OSS Bucket

# ossutil mb oss://angry-medusa
1.244258(s) elapsed
# ossutil ls oss://angry-medusa
Object Number is: 0
0.350505(s) elapsed

Upload to OSS

# ossutil cp . oss://angry-medusa –rf

OSS Static Page Feature

Adding the CDN

Locking OSS Down

Conclusion

# copy your assets over:
# ossutil cp . oss://angry-medusa –rf
# invalidate the cache through pull:
# aliyuncli cdn RefreshObjectCaches --ObjectType Directory --ObjectPath http://angry-medusa.me/
# invalidate through push
# aliyuncli cdn PushObjectCache --ObjectPath http://angry-medusa.me/ --ObjectTyp
e Directory
# party

Further Reading

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store