Sending a File to an Instance from the appliance

Hello All,

I’m here to see if it’s possible or if morpheus has a built-in tool to to send a file Generated from a script during the deploy or post provisioning phase to the actual instance itself. I know there is ways to manually do this. But I’m wondering if there is a way to send that file to that server after it runs.

We have the concepts of file templates and script templates. The former can provide configuration for applications, while script templates are executed on the instance, and perform configuration actions like download software. Both will accept morpheus variables which will be interpolated and added to the scripts.

https://docs.morpheusdata.com/en/latest/library/templates/file_templates.html?highlight=file%20templates

https://docs.morpheusdata.com/en/latest/library/templates/scripts.html?highlight=file%20templates

Would these serve your use case?

2 Likes

I would generally go with @Ollie_Phillips answer here as that would also allow you the capability to edit the file in real time provided your instance type is set to allow settings.

However, if it does not meet your needs, we also have the concept of Archives which can be found at Tools → Archives. This can be linked to a storage bucket which you can then access via private or public links.

You can have a task that pulls a file or binary from an archive in a provisioning workflow.

to put some clarification we are tattooing the server writing the info to a file and then saving it to a location on the instance or VM itself. So Morpheus would gather the info and then after all the info is collected. just place it in said location. I think the File templates might actually work may need toy with it.

To add to the party. Based on your last comment @Derp0ps, I think File Templates is what you want like @Ollie_Phillips said.

I just wanted to add one more feature in Morpheus that might help if you (or others) have a larger set of files or binaries that need to be copied across. In addition to Archives that @sjabro mentioned, you can also use Deployments. This utilizes Archives in the background that can be set to transfer different versions of files to your instance, for example if you need to install or upgrade an app.