Transfer of an Epinio Application to another cluster
Epinio provides the ability to export all parts of a running application and then use these to run the application in a different cluster.
Note however that the above only applies to the core application itself, and not to configurations and services it may need / be bound to in the origin cluster.
Exporting an application
APP is trivially done by running the command
epinio app export APP /path/to/a/directory/of/your/choice/
After the command has run the chosen directory contains the 3 parts of the application needed to run it elsewhere, namely:
app-image.tar. The application's runtime image as generated by the staging process and saved into a tar archive as generated by
app-chart.tar.gz. The application chart used to deploy the application.
values.yaml. The configuration of the application chart. This part references the application image. Beware, this reference is only valid for the origin cluster.
APP into a new cluster
docker load app-image.tarto import the image and its layers into the local docker setup. The output will contain a line referencing the
Loaded image ID. This is the hash of the loaded image and needed in the next step.
Beware. Do not use
docker import, nor
docker image importfor this. While these commands do store the image into the local docker similar to
loadthey do not preserve the layering, nor the Entrypoint information coming with these. It is the latter which makes the result unusable for our purposes.
docker tag HASH REGISTRY/ORG/NAME:TAGwhere
HASHis the hash of the image as reported by the previous step.
REGISTRY, etc. are mostly arbitrary values chosen by the importer. The
REGISTRYis optional, i.e. would default to dockerhub. If set it has to refer to an actual registry the destination cluster is able to pull from.
docker push REGISTRY/ORG/NAME:TAGto save the image to the chosen registry. Without this step the image would only exist locally and could not be pulled later.
imageURLfield in the file
values.yamlto replace the existing image reference, valid only for the origin cluster, with
idinformation of the
values.yamlto prevent clashes with the instance of
APPrunning on the origin cluster. This will of course not be necessary if
APPwas not kept running on the origin cluster.
Possibly edit the
helm upgrade --install NAME app-chart.tar.gz --values values.yamlto deploy the modified application on the destination cluster under an arbitrarily chosen release name.