mozmeao / infra

Mozilla Marketing Engineering and Operations Infrastructure
https://mozilla.github.io/meao/
Mozilla Public License 2.0
59 stars 12 forks source link

Investigate assets.mozilla.net Automation #1352

Closed bensternthal closed 4 years ago

bensternthal commented 4 years ago

Copied over from milestone board.

glogiotatidis commented 4 years ago

My suggestion is to use Git LFS and store assets in a GitHub repo. On push, a GitHub Action would sync with a S3 bucket. Access would be managed on GitHub and no AWS credentials would be handed out to developers.

Details:

Initial Setup

git clone git@github.com:mozilla/repo/with/assets
git lfs install
mkdir assets
git lfs track "assets/*"
git add .gitattributes
git commit -m "Track assets/ with git lfs"

To add a file

dd if=/dev/urandom of=assets/50mb count=50 bs=1M
git add assets/50mb
git commit -m "Add 50mb file"
git push origin master

Thoughts @bensternthal @pmac @mozmeao/www ?

pmac commented 4 years ago

That sounds way easier than I thought! Does our GitHub plan support LFS for the mozmeao org or do we have to upgrade?

glogiotatidis commented 4 years ago

I should. I tried with a test org I run and it just worked.

pmac commented 4 years ago

Awesome. I guess my only other question then is if we should do this in the bedrock repo and just upload large files to our normal media s3 bucket, or keep it separate? I vote separate just because bedrock is already so large and we might use assets.m.o for other sites.

glogiotatidis commented 4 years ago

I agree on having separate repos.

glogiotatidis commented 4 years ago

Open questions