arunoda / meteor-up-legacy

Production Quality Meteor Deployments
MIT License
2.26k stars 395 forks source link

mup reconfig doesn't work with custom appNames #45

Open Multiply opened 10 years ago

Multiply commented 10 years ago

When issuing mup reconfig for deployments with a custom appName, it still tries to use meteor as the appName, and it then fails, as far as I can tell.

$ mup reconfig

Meteor-UP : Production Quality Meteor Deployments
--------------------------------------------------

Started TaskList: Updating Configurations
[domain.com] setting up env vars
[domain.com] setting up env vars: SUCCESS
[domain.com] restarting the app
[domain.com] restarting the app: FAILED

        -----------------------------------STDERR-----------------------------------
        Warning: Permanently added 'domain.com,1.2.3.4' (ECDSA) to the list of known hosts.
        stop: Unknown job: meteor
        start: Unknown job: meteor
        -----------------------------------STDOUT-----------------------------------
        ----------------------------------------------------------------------------
Completed TaskList: Updating Configurations
$
arunoda commented 10 years ago

did you call mup setup

Multiply commented 10 years ago

Yes, initially. Should I call it every time I want to reconfigure?

zenmatt commented 10 years ago

I can confirm this problem too, and actually ran mup setup by accident right before running mup reconfig.

Multiply commented 10 years ago

The issue is here: https://github.com/arunoda/meteor-up/blob/master/lib/taskLists.js#L101

You need to store the old appName, and stop that service. And then you need to start the new service from the appName variable.

Where would you like this variable stored?

Edit: Changing appName is a bit more complex, don't you think? It should rename all the directories, and files where the appName is used.

Edit 2: Shouldn't it work a bit more like the meteor deploy command instead? mup deploy appName

When you've deployed a project once, it could store the appName in a file, so you don't have to type it in, every time. If you then want to take down a project from your server, you would do mup deploy appName --delete, again, to reflect how Meteor works.

arunoda commented 10 years ago

I've added a fix for mup reconfig. But it does not handle the deletion as you mentioned. We need better management for multiple deployments.

Let's try something.

Multiply commented 10 years ago

Yes. Your fix will work, when we're not changing the appName.

I wonder how often you would do that, anyway?