-
Notifications
You must be signed in to change notification settings - Fork 772
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Volume mount on the host isn't supported #599
Comments
@judavi Just to make sure, but have you created any PersistentVolume's before you've used the PersistentVolumeClaims (what Kubernetes is creating within OpenShift) |
@cdrage |
@judavi Here is what I did to deploy the app on openshift I created the config here with help of kompose but it has few tweaks(added the configmap where host mount is done in mysql deploymentconfig and also there is issue with reading the info about git repo, so update the buildconfigs): Link to following big config file from pastebin: $ cat config.yaml
apiVersion: v1
items:
- apiVersion: v1
kind: Service
metadata:
creationTimestamp: null
labels:
io.kompose.service: mysql
name: mysql
spec:
clusterIP: None
ports:
- name: headless
port: 55555
targetPort: 0
selector:
io.kompose.service: mysql
status:
loadBalancer: {}
- apiVersion: v1
kind: Service
metadata:
creationTimestamp: null
labels:
io.kompose.service: server
name: server
spec:
ports:
- name: "8080"
port: 8080
targetPort: 8080
- name: "4443"
port: 4443
targetPort: 4443
selector:
io.kompose.service: server
status:
loadBalancer: {}
- apiVersion: v1
kind: Service
metadata:
creationTimestamp: null
labels:
io.kompose.service: signer
name: signer
spec:
clusterIP: None
ports:
- name: headless
port: 55555
targetPort: 0
selector:
io.kompose.service: signer
status:
loadBalancer: {}
- apiVersion: v1
kind: DeploymentConfig
metadata:
creationTimestamp: null
labels:
io.kompose.service: mysql
name: mysql
spec:
replicas: 1
selector:
io.kompose.service: mysql
strategy:
resources: {}
type: Recreate
template:
metadata:
creationTimestamp: null
labels:
io.kompose.service: mysql
spec:
containers:
- args:
- mysqld
- --innodb_file_per_table
env:
- name: TERM
value: dumb
- name: MYSQL_ALLOW_EMPTY_PASSWORD
value: '"true"'
image: ' '
name: mysql
resources: {}
volumeMounts:
- mountPath: /docker-entrypoint-initdb.d
name: mysql-config
- mountPath: /var/lib/mysql
name: notary-notary-data
restartPolicy: Always
volumes:
- name: mysql-config
configMap:
name: mysql
- name: notary-notary-data
persistentVolumeClaim:
claimName: notary-notary-data
test: false
triggers:
- type: ConfigChange
- imageChangeParams:
automatic: true
containerNames:
- mysql
from:
kind: ImageStreamTag
name: mysql:10.1.10
type: ImageChange
status: {}
- apiVersion: v1
kind: ImageStream
metadata:
creationTimestamp: null
labels:
io.kompose.service: mysql
name: mysql
spec:
tags:
- annotations: null
from:
kind: DockerImage
name: mariadb:10.1.10
generation: null
importPolicy: {}
name: 10.1.10
status:
dockerImageRepository: ""
- apiVersion: v1
kind: PersistentVolumeClaim
metadata:
creationTimestamp: null
labels:
io.kompose.service: mysql-claim0
name: mysql-claim0
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100Mi
status: {}
- apiVersion: v1
kind: PersistentVolumeClaim
metadata:
creationTimestamp: null
labels:
io.kompose.service: notary-notary-data
name: notary-notary-data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100Mi
status: {}
- apiVersion: v1
kind: DeploymentConfig
metadata:
creationTimestamp: null
labels:
io.kompose.service: server
name: server
spec:
replicas: 1
selector:
io.kompose.service: server
strategy:
resources: {}
template:
metadata:
creationTimestamp: null
labels:
io.kompose.service: server
spec:
containers:
- args:
- -c
- ./migrations/migrate.sh && notary-server -config=fixtures/server-config.json
command:
- /usr/bin/env
- sh
image: ' '
name: server
ports:
- containerPort: 8080
- containerPort: 4443
resources: {}
restartPolicy: Always
test: false
triggers:
- type: ConfigChange
- imageChangeParams:
automatic: true
containerNames:
- server
from:
kind: ImageStreamTag
name: server:latest
type: ImageChange
status: {}
- apiVersion: v1
kind: ImageStream
metadata:
creationTimestamp: null
labels:
io.kompose.service: server
name: server
spec: {}
status:
dockerImageRepository: ""
- apiVersion: v1
kind: BuildConfig
metadata:
creationTimestamp: null
name: server
spec:
nodeSelector: null
output:
to:
kind: ImageStreamTag
name: server:latest
postCommit: {}
resources: {}
runPolicy: Serial
source:
git:
ref: master
uri: https://github.com/docker/notary.git
type: Git
strategy:
dockerStrategy:
dockerfilePath: server.Dockerfile
type: Docker
triggers:
- type: ConfigChange
- type: ImageChange
status:
lastVersion: 0
- apiVersion: v1
kind: DeploymentConfig
metadata:
creationTimestamp: null
labels:
io.kompose.service: signer
name: signer
spec:
replicas: 1
selector:
io.kompose.service: signer
strategy:
resources: {}
template:
metadata:
creationTimestamp: null
labels:
io.kompose.service: signer
spec:
containers:
- args:
- -c
- ./migrations/migrate.sh && notary-signer -config=fixtures/signer-config.json
command:
- /usr/bin/env
- sh
image: ' '
name: signer
resources: {}
restartPolicy: Always
test: false
triggers:
- type: ConfigChange
- imageChangeParams:
automatic: true
containerNames:
- signer
from:
kind: ImageStreamTag
name: signer:latest
type: ImageChange
status: {}
- apiVersion: v1
kind: ImageStream
metadata:
creationTimestamp: null
labels:
io.kompose.service: signer
name: signer
spec: {}
status:
dockerImageRepository: ""
- apiVersion: v1
kind: BuildConfig
metadata:
creationTimestamp: null
name: signer
spec:
nodeSelector: null
output:
to:
kind: ImageStreamTag
name: signer:latest
postCommit: {}
resources: {}
runPolicy: Serial
source:
git:
ref: master
uri: https://github.com/docker/notary.git
type: Git
strategy:
dockerStrategy:
dockerfilePath: signer.Dockerfile
type: Docker
triggers:
- type: ConfigChange
- type: ImageChange
status:
lastVersion: 0
kind: List
metadata: {} After that creating a project that allows anyuid to run on the openshift: oc login -u developer -p developer
oc new-project not
oc login -u system:admin
oc adm policy add-scc-to-user anyuid -n not -z default
oc login -u developer -p developer Create a config map so that mysql comes up properly (in the notary repo) cd notarysql/mysql-initdb.d/
oc create configmap mysql --from-file initial-notaryserver.sql --from-file initial-notarysigner.sql And finally deploy the configs: $ oc create -f config.yaml
service "mysql" created
service "server" created
service "signer" created
deploymentconfig "mysql" created
imagestream "mysql" created
persistentvolumeclaim "mysql-claim0" created
persistentvolumeclaim "notary-notary-data" created
deploymentconfig "server" created
imagestream "server" created
buildconfig "server" created
deploymentconfig "signer" created
imagestream "signer" created
buildconfig "signer" created This all comes up nice and good the only problem is that there is some errors like this in $ oc logs server-1-kx851
[SNIP]
{"level":"error","msg":"Trust not fully operational: rpc error: code = 14 desc = grpc: the connection is unavailable","time":"2017-05-15T14:02:46Z"}
{"level":"error","msg":"Trust not fully operational: rpc error: code = 14 desc = grpc: the connection is unavailable","time":"2017-05-15T14:02:56Z"}
{"level":"error","msg":"Trust not fully operational: rpc error: code = 14 desc = grpc: the connection is unavailable","time":"2017-05-15T14:03:06Z"}
{"level":"error","msg":"Trust not fully operational: rpc error: code = 14 desc = grpc: the connection is unavailable","time":"2017-05-15T14:03:16Z"}
2017/05/15 14:03:25 grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: dial tcp: lookup notarysigner on 192.168.42.157:53: server misbehaving"; Reconnecting to {notarysigner:7899 <nil>}
{"level":"error","msg":"Trust not fully operational: rpc error: code = 14 desc = grpc: the connection is unavailable","time":"2017-05-15T14:03:26Z"}
[SNIP] |
@surajssd WOW!!! thanks man ! this guide is really helpful for me!! |
@surajssd I'm still stuck with "Trust not fully operational: rpc error" error. Did you have luck finding a solution? |
@surajssd the problem it's that! so to fix that issue I update the code on https://github.com/docker/notary/blob/7c26a98a3ff2bef958850ae7a027435fdb5f010d/fixtures/server-config.json to not use the alias (just use signer). Apart of that you need to update the default certs to include also signer as a valid alternative After that you just execute the script to rebuild the certs and after that you rebuild you signer server and that's all! |
@judavi hey if you blog about it tell us as well! 😃 |
@surajssd one question, after you create each one of the yaml configs how you start each one of the containers? at this moment I'm using - kompose up - but that rewrites any change made in the yaml configs from openshift so how you manually start each one of the containers? |
@judavi I have converted once and then using following command: oc create -f config.yaml |
Hi!
I'm using https://github.com/docker/notary/blob/master/docker-compose.yml Docker Notary. My plan is deploy the Docker Notary Server on Openshift so I'm using
kompose -f docker-compose.yml --provider openshift up -v
but the volumes keep ever in pending state.Also when I use
kompose -f docker-compose.yml --provider openshift down -v
I'm having this warning that I'm not sure if is important or not to (sorry I'm still new with containers things)
How can I fix this issue? I appreciate any comment
The text was updated successfully, but these errors were encountered: