OpenSecuritySummit / oss2018

Open Security Summit 2018
https://2018.open-security-summit.org/
29 stars 171 forks source link

Improve deploy speed of site #167

Closed DinisCruz closed 2 years ago

DinisCruz commented 6 years ago

At the moment it is far too slow (about 20 to 30 secs)

we need to get to the speed we had last year (a couple secs)

one way to do this is using the node service trick we used last year (which listens for a web hook , which triggers a git pull, which triggers a site rebuild)

fzipi commented 6 years ago

I was thinking on using aws lambda, but even with that you'll have the cloudfront invalidation and it will take a while.

fzipi commented 6 years ago

These are the times spent in each phase of the pipeline: screenshot from 2018-04-28 11-29-25

VasBu commented 6 years ago

@fzipi sent an message on Slack that he already implemented an suggested tool by @DinisCruz to resolve this. If this is already resolved, please close this issue.

fzipi commented 6 years ago

I would like to try an additional one. At the summit, we will be commiting a lot and speed is key. So every second we can lower, is good.

VasBu commented 6 years ago

... in that case... we keep this issue open.

fzipi commented 6 years ago

Well, been doing one additional push for this. I've setup a new codebuild using a new custom container with hugo embeeded, but times are worst than using our actual setup. I think it is related on codebuild pulling the new docker vs. using the default aws codebuild.

screenshot from 2018-05-27 11-12-26

Times on uploading artifacts are a PIA and maybe can be lowered if we use aws s3 sync.

I have another try similar on what we made last summit using node, but this time in a Go application. It listens to simple webhooks to do the pull, build and push. But we are talking that the difference can be of about 10 seconds. I don't know now if is it worth the effort.