I think you’re confusing me with the original creators of PullReview. My other venture is packager.io, which you might remember as well. Congrats to you for the continued development of your on premise packaging solution!
331 karma · joined January 23, 2012
Currently launching https://runs-on.com, 10x cheaper GitHub Action runner, on premise.
More details at https://cyrilrohr.com
I think you’re confusing me with the original creators of PullReview. My other venture is packager.io, which you might remember as well. Congrats to you for the continued development of your on premise packaging solution!
Regarding security, we do believe that it is a selling point for many companies. You might be ok granting access to Circle CI or others, but for a new kid on the block that’s more difficult. And being run as a self contained action means you are not dependent on the availability or continuity of the service you depend on.
As for misbehaving instances, this is indeed something that we thought about, and we’ll make sure this doesn’t happen in two ways: - allowing to set a max duration for an instance, and a max number of concurrent instances - having an additional trigger in the workflow file to launch a cleanup phase like every day, since GitHub actions already support cron-like tasks
I’ll send you an email a bit later as I’m currently on the go, thanks again and talk to you soon!
With our approach you keep the same instance for the duration of a PR or branch, so you mostly incur the docker tax On the first deploy. Afterwards it will reuse the local cache.
Does that make sense?
At this point you’re the only one to know about your preview server, and you need to not forget to destroy it when you’re done.
PullPreview handles all of the synchronisation mechanism, as well as providing pretty URLs, automated SSH access to any GutHub users, source IP filtering, port firewalling, HTTPS support etc.
Plus the whole integration into GitHub so that you don’t need to retrieve the preview URL by yourself, and you get notified if anything goes wrong during the deploy, with full logs available.
That’s the gap we’re trying to fill :)
Many companies have come with their own version of the concept, which in our experience doesn’t stand well the test of time (because the person that wrote the glue code left the company or docs are lacking or setup is very complex, etc). Hence PullPreview, so that companies can delegate the burden of maintaining that workflow to us, while retaining full control over their code and servers.
Our version is also Open Source (but not free except for non profits) and it doesn’t limit in any way the number of ports you can expose . By default and for ease of use ports 22, 80 and 1000-10000 are allowed in the firewall, but you can reduce that to the bare minimum with just a single config option. See https://github.com/pullpreview/action/wiki/Inputs For more details.
Actually the way it works now is that you keep the same server for the duration of a PR / branch. This means faster redeploys since the docker cache is there, and you don’t lose your demo data on every redeploy.
Cloud-init is used for the initial setup of docker and compose, but then the code sync happens through sending the app tarball from GitHub to the server and refreshing the compose.
We thought about mono-node k8s, but found that removing one abstraction layer would be better for now.
Thanks for your comment!
Also it’s pretty expensive with their per-seat pricing ;)
I had a look at the angular way of doing it: very nice to see other approaches! From a quick look it does seem to require quite a bit more steps and to be more limited in scope, but the documentation looks very good indeed! Thanks for sharing!
The idea here is not to skip the code review, but augment it with a way to experiment with the feature as early as possible in the development process.
It’s particularly useful for product owners who may not be coders and want to give feedback on how the feature aligns with the vision.
It’s also useful for other developers because seeing the thing live will give more context as to what the feature does and how it behaves, and as such might help reviewing the code and get reviews other than « good to merge » without any meaningful comments.
And finally it’s also very useful in making sure every dev can do a little QA on their feature in a standardised environment that runs with non-dev setting, without waiting for a staging server to be available.
The 80/20 rule most likely applies here. For some PRs you won’t need preview environments (just don’t add the label), but from my consulting gigs I have experienced more than once the need for this kind of tooling, and also witnessed more than once how many companies try to reinvent their own thing and the time they spend/waste doing so.
There are indeed a few other solutions to this problem. But we haven’t found any with all of the following characteristics:
a) doesn’t require access to your private code
b) works for any type of app
c) doesn’t require buying into kubernetes if you don’t want to
d) cheap to run
A little digression here but the main trigger for creating this was seeing a post [1] on the Basecamp blog about their implementation of preview envs for their upcoming service: It seemed so convoluted and expensive that surely there was a way to do it with less moving parts (I totally understand that Basecamp may require a complex setup like that, but I’m pretty sure it should remain an outlier).
Your comment about Netlify forgetting to remove the deployment link from the GitHub UI once it’s merged is also true, and from my testing Heroku also forgets to remove it. The GitHub deployment API documentation really needs some love, but still surprising since the removal is supported.
Regarding domain name provisioning, you can see a few examples in the demos linked from the features page. Currently the pattern is IP-gh-REPO_ID-[pr|branch]-[PR_NUMBER|BRANCH_NAME].my.pullpreview.com. Something I forgot to mention on the features page is that custom domain names are also supported. Custom patterns could also be supported without any issue.
[1] https://m.signalvnoise.com/seamless-branch-deploys-with-kube...
There are a few demos listed in the Features section. The simplest one being a wordpress repo which shows the absolute minimal configuration required in terms of files (1 docker-compose, and 1 workflow file): https://github.com/pullpreview/demo-wordpress
You can clone that repo and fill in your AWS credentials in the Secrets section of the GitHub repository settings, and then you'll get a live environment running (like in https://github.com/pullpreview/demo-wordpress/deployments)
## Context
PullPreview’s main use case is for making it easier to review code in branches or pull requests, because reviews with live code are always better than code-only reviews. This means better and faster feedback from reviewers (be it clients or teammates), so that everyone can iterate faster on the feature being developed.
However in most organizations, there is only a handful of staging servers available to the developers, which are hard to keep in sync, maintain, and with complicated processes to make sure you don’t step on someone else’s code.
PullPreview solves this with ephemeral environments for any pull request or branches, just by adding a label from the GitHub UI. URLs for the deployed environments are displayed right into the GitHub UI, thanks to the integration with the Deployments API.
## How it works (spoiler: no kubernetes)
Contrary to many other solutions, PullPreview _never sees your code_, because it runs as a GitHub Action and does all the work within the GitHub Action runner. The Action automatically provisions a server in _your_ AWS account (a cheap Lightsail instance), and then boots your application using the Docker Compose file(s) that you specify. The server is automatically destroyed when the PR is merged, closed, or the label removed.
Some of the features include unlimited parallel environments, support for SSH access, source IP filtering, port filtering, seed data support, data persistence across deploys, all managed from the GitHub UI.
All of this is packaged as an Open-Source GitHub Action that can be tried right now. You can run it for free for 30 days, and after that we have two license tiers at 120€/year and 300€/year. We believe it is pretty cheap compared to rolling and maintaining your own solution in-house. It is also free for non-profits.
## Next steps
We’re looking for feedback on the idea, what could be missing, and the pricing. We are also discovering many more use cases while dogfooding our own idea. For instance, we are currently running a few services in production, continuously deployed thanks to PullPreview (e.g. pullpreview.com itself).
The trick is to understand that for complex behaviours you can't just glue different actions together, and instead you may have to build your own action and use the GitHub API token provided in the context to possibly perform additional actions.
On the contrary, with pkgr.io, additional build and runtime dependencies can/must be added by the package maintainer if anything other than the base stuff is needed. See https://pkgr.io/doc#dependencies and, as an example, the .pkgr.yml file for a fairly complex project such as Gitlab: https://github.com/pkgr/gitlabhq/blob/pkgr/.pkgr.yml.
In short, if you already have a working Docker installation, you probably don't need PKGR, though nothing prevents you from building your containers by simply apt-get install'ing the app instead of having 10's of RUN commands to install the dependencies.
curl -T /path/to/any/file flag.io
# or
cat some-file | curl -T - flag.io
Basically, pipe anything you want into it. It can also syntax-highlight your text files.