I want to create a Jelastic environment with a load balancer and a cp node. I want to add the cp node with the addNodes
api method, because it needs specific data to start. My manifest looks like this:
jpsVersion: 1.3
jpsType: install
application:
id: test-app
name: Test App
version: 0.0
env:
topology:
nodes:
- nodeGroup: bl
nodeType: nginx-dockerized
tag: 1.16.1
displayName: Node balancing
count: 1
fixedCloudlets: 1
cloudlets: 4
onInstall:
- addFile
- setup
actions:
addFile:
- cmd [bl]:
- mkdir /data
- echo "Hello world" > /data/test.txt
user: root
setup:
- addNodes:
- nodeGroup: cp
nodeType: docker
displayName: Test Mount
count: 1
fixedCloudlets: 1
cloudlets: 4
dockerName: alpine
volumeMounts:
/kickstart:
readOnly: true
sourcePath: /data
sourceNodeGroup: bl
dockerVolumes:
- /kickstart
For some reason, I want my alpine image to be provided with the data I am storing in the folder /kickstart
. Of course, in that case, it's completely irrelevant. The example above is just kept simple enough to be reproducible. In my real use-case, the docker image I want to mount will not be able to run without some application-specific data that are filled up with the manifest's settings completed upon user input. That's why it is necessary that the data be available upon docker node addition.
My problem is that the above simple manifest does not work. Indeed, on my docker node, I have no access to /kickstart/test.txt
folder. What am I doing wrong?