meteor mup: building and deploying programatically - meteor

I want to set autoscaling for my meteor app.
Ideally I would like to keep build image ready on s3(or some other storage, image would be typically generated from last build) and using aws-lambda(so that no dedicated build server is needed) to deploy using this image on new instance. I would like all this to be finished within 2 minutes.
So is it possible to mup for these tasks
build image and save it to aws s3, without deployment.
run mup deploy programatically using image from aws s3.
No need of mup setup, because I will launch instance with ami which has already been setup.
mup is also setting up ssl for me using letsencrypt.
I am also open to other tools/scripts to achieve this.

You won't get much response from this question, because mup makes deployment life quite simple, and most people who use it don't know much about what it does.
You should have a look at the code of meteor-up to see what it does, and see where you can extend it for your own purposes. You could also look at yamup, as that is another approach to the same problem.

Related

Is it possible to modify the NotebookApp config options for a jupyter server instance while it's running?

I do most of my dev work locally but ocassionally I have to switch over to using a preconfigured jupyterlab instance on GCP. The way things are set up now, I'm unable to ssh into these notebook servers and the only way for me to interact with them is through the jupyterlab integrated terminal.
I have custom save hook functions set up in my local environment for testing, linting, etc.--comes in really handy for keeping everything in a production-ready state and I'd like to be able to set up a sort of "environment as code" system where when I pull updated code into a new environment, the customized configuration would move with it and take effect automatically. I suppose the proper way to do this would be to use a Docker image and rebuild the cloud instance from scratch every time it needs an update but it kind of seems like overkill for such minor changes. (Also the Google docker images don't work that well on my M1 MacBook ).

Prevent appspec from running scripts (disable hooks)

I'm new to codedeploy. I managed to make a deployment to an ec2 instance successfully (and using git to manage code so everything works beautifully now).
I want some other people besides myself working in the project to be able to deploy source code to the instance but not be able to run a script (especially because codedeploy seems to be running as root). Think of it as an admin/webmaster scenario.
In other words, appspec.yml has the "hooks" section under it and you can run any scripts as part of the deployment. I want to prevent this, the instance has all the software ready for the deployment so won't be needing this.
2 questions:
1) Does this make sense or am I grossly misunderstanding something/am I overkilling by using codedeploy altogether?
2) If it makes sense, how can I achieve this?
This doesn't seem to be something that CodeDeploy is able to do at this moment. But do you want to disable the auto deploy from Github to CodeDeploy? And if anyone else push a code change, it'll exist on Github. When you are ok with the changes, you can do a manually deployment from Github on CodeDeploy console.

What service to use for Meteor App deploy?

I need Meteor App in production, without worrying about scaling in the future. App will have 500 user online in any one time - as maximum. I read in the oficial guide that the best practice for many reasons is deploy to Galaxy.
But there are also many articles about deploy to Digital Ocean and Heroku.
So what variant is the best?
Use digitalocean.
Set up nameservers, set up node on your droplet and have Mupx do the deploying. It's very easy and DO is cheap.
DO has easy to follow tutorials to do the initial setup and you will thank me later + your wallet will be happy.
I have used Galaxy in a production level app for one of our clients and it works fantastic. If you want a deployment where you don't have to worry about scaling at all, then Galaxy is for you.
With time, as your users increase and you find yourself needing more resources, you can assign better containers and CPU power with just the click of one button. It also provides complete logs and some performance metrics to help you in a completely meteor-specific manner.
The deployment process itself is as simple as having a settings json file, and running a one line command like:
DEPLOY_HOSTNAME=galaxy.meteor.com meteor deploy appname.meteorapp.com --settings settings.json

How do you push updates to a deployed meteor app that has a filesystem?

I have an app running on my own digitalocean VM that I'm trying to play around with to figure out how to run a meteor production server. I deployed it with meteor build, but now I'm a bit unsure about how to push updates. If I build a new tarball on my own machine, I will loose file references that my users have made to files in bundle/uploads, because the remote filesystem isn't incorporated into my local project. I can imagine some hacky ways to work around this, but besides hosting the files on s3 or another 3rd party server, is there any way to "hot code push" into the deployed app without needing to move files around on my server?
Am I crazy for wondering what the meteor equivalent of git push/pull is in production, or just ignorant?
You can use dokku (https://github.com/progrium/dokku). DigitalOcean allows you to create an instance pre-installed with dokku too.
Once you've set up your ssh keys, set the environment variables, ROOT_URL, PORT and MONGO_URL you can add that server as a git remote and simply git push to it.
Dokku will automatically build up the Meteor app and have it running, and keep it up to date whenever you git push.
I find Dokku is very convenient. There's also flynn and deis which are able to do the same in multi tenant environment with way more options.
Just one thing to keep in mind with this is to push the guys who own the repo to keep the Node version in the buildpack up to date. Meteor is a bit overzealous when it comes to using the latest version of Node and refusing older versions.
Meteor does lack a bit in this department. I can't remember where I may have heard this, but I believe they intend on adding this very popular Meteor deployment package to their library. Short of switching to a more compatible host, I'm not aware of any better solutions.

Meteor deploy erase public folder

on meteor i've just added a new feature to download some image in public/img/aSpecificFolder.
It works locally, but i've seen that each time i deploy on meteor.com using deploy command, it looks like that public folder is completely erased. Or maybe that the deploy remove the current app and install a new one. So it only keept the connection to db but all files are removed and put again.
What is the good way of doing if i want to store image on meteor.com ?
thanks
Have you considered using something like collections-fs. When you deploy on meteor it will clear your previous app and use the new one.
If you use something like collections-fs it lets you store your files in the mongo database instead, so they're not actually on the same server that serves out data.
This is also good in another way (scaling) since each virtual environment that hosts your app is able to access the files. If you store the files statically they will only be accessible on one of the servers.
For the moment meteor hosting (via meteor deploy) uses one server, but its likely it will be scalabale in future.

Resources