--
You received this message because you are subscribed to the Google Groups "fabric8" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fabric8+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I have a list of issues that we have been facing. I think there is 9 different issues.
The latest is the Jenkins slave is failing to mount, so the build hangs.
Is it possible to deploy our projects remotely?
If you're developing using java then yes you can build the image locally and push images to the remote docker registry using the fabric8 maven plugin. Make sure you have the remote address as an insecure registry in your local machine docker options. More details https://maven.fabric8.io/#fabric8:push
Ah, https://maven.fabric8.io/#openshift-and-kubernetes-access this looks helpful!
On 26 Jan 2017, at 14:30, kurr...@gmail.com wrote:
Thanks James.What is the difference between the fabric8 registry and the openshift registry?
<plugin> <groupId>io.fabric8</groupId> <artifactId>docker-maven-plugin</artifactId> <version>0.14.2</version> <configuration> <images> <image> <name>shiftwork/shiftwork:latest</name> <build> <from>${docker.from}</from> <assembly> <basedir>/app</basedir> <descriptorRef>${docker.assemblyDescriptorRef}</descriptorRef> </assembly> <ports> <port>8080</port> </ports> <cmd> <shell>java -jar /app/${project.artifactId}-${project.version}.war --spring.profiles.active=prod</shell> </cmd> </build> </image> <authConfig> <push> <username>xxx</username> <password>xxx</password> </push> </authConfig> </images> </configuration> </plugin>--
You received this message because you are subscribed to the Google Groups "fabric8" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fabric8+unsubscribe@googlegroups.com.
The "Cannot create docker access object " typically means your maven process can't talk to the docker socket (either on your laptop or the cluster you've pointed DOCKER_HOST at).
The simplest option to do local development is to install minikube or minishift locally then its easy to do local builds against your local cluster without worrying about docker registy pushes or installing local docker.
If you want to build locally using docker images but not use minishift/minikube but still push to a remote registry, you need to install a local docker install so that you can actually build docker images on your laptop.
The other option is to setup S2I builds or Jenkins builds on the cluster and just git push and build them on the cluster (which has docker).
Hi James, and thanks for your reply.On Thu, Jan 26, 2017 at 6:08 PM, James Strachan <james.s...@gmail.com> wrote:The "Cannot create docker access object " typically means your maven process can't talk to the docker socket (either on your laptop or the cluster you've pointed DOCKER_HOST at).Ok, any suggestions on how to fix this?
The simplest option to do local development is to install minikube or minishift locally then its easy to do local builds against your local cluster without worrying about docker registy pushes or installing local docker.Ok, but we need to get our apps deployed onto the server. Im not sure if this helps.
On Thu, Jan 26, 2017 at 6:08 PM, James Strachan <james.s...@gmail.com> wrote:The "Cannot create docker access object " typically means your maven process can't talk to the docker socket (either on your laptop or the cluster you've pointed DOCKER_HOST at).Ok, any suggestions on how to fix this?Your DOCKER env vars need to point to where docker is running. e.g. DOCKER_HOST / DOCKER_CERT_PATH et al
Global configuration parameters specify overall behavior like the connection to the Docker host. The corresponding system properties which can be used to set it from the outside are given in parentheses.
Does this mean host, as in the host server, our remote server?The docker-maven-plugin uses the Docker remote API so the URL of your Docker Daemon must somehow be specified. The URL can be specified by the dockerHost or machine configuration, or by the DOCKER_HOST environment variable.
The Docker remote API supports communication via SSL and authentication with certificates. The path to the certificates can be specified by the certPath or machine configuration, or by the DOCKER_CERT_PATH environment variable.
The simplest option to do local development is to install minikube or minishift locally then its easy to do local builds against your local cluster without worrying about docker registy pushes or installing local docker.Ok, but we need to get our apps deployed onto the server. Im not sure if this helps.There's local development and local testing; then doing CD; for the latter building on the cluster post commit/push is simplest. For local building minikube/minishift is simplest; but you shoudl also be able to use local docker installs and push to global docker registries too. (They are complex to setup mind).See if you can do a docker build first; once you can do that then you can try figure out how to do the right docker push to push from your laptop to the global docker registry you're using.If you're using s2i and openshift then there's no need for the docker push part; as S2I does that bit for you; so that'll be simpler.
On Thu, Jan 26, 2017 at 6:33 PM, James Strachan <james.s...@gmail.com> wrote:On Thu, Jan 26, 2017 at 6:08 PM, James Strachan <james.s...@gmail.com> wrote:The "Cannot create docker access object " typically means your maven process can't talk to the docker socket (either on your laptop or the cluster you've pointed DOCKER_HOST at).Ok, any suggestions on how to fix this?Your DOCKER env vars need to point to where docker is running. e.g. DOCKER_HOST / DOCKER_CERT_PATH et alGlobal configuration parameters specify overall behavior like the connection to the Docker host. The corresponding system properties which can be used to set it from the outside are given in parentheses.
Does this mean host, as in the host server, our remote server?
The docker-maven-plugin uses the Docker remote API so the URL of your Docker Daemon must somehow be specified. The URL can be specified by the dockerHost or machine configuration, or by the
Again, when it says remote api, this means our remote server?DOCKER_HOSTenvironment variable.
The Docker remote API supports communication via SSL and authentication with certificates. The path to the certificates can be specified by the certPath or machine configuration, or by theDOCKER_CERT_PATHenvironment variable.Do we need to have certificates installed? Should we expect errors if we dont?
<plugin> <groupId>io.fabric8</groupId> <artifactId>docker-maven-plugin</artifactId> <version>0.14.2</version> <configuration> <dockerHost>/etc/docker</dockerHost> <registry>abric8-docker-registry.default.openshift.mydomain.co:443</registry>If you've installed docker on your laptops then the env vars should all be setup for you?
It may just be you need to define DOCKER_HOST to point to the host/port
--
You received this message because you are subscribed to the Google Groups "fabric8" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fabric8+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
d-m-p by default uses the Unix socket (like Docker CLI does itself).
To unsubscribe from this group and stop receiving emails from it, send an email to fabric8+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--... roland--
You received this message because you are subscribed to the Google Groups "fabric8" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fabric8+unsubscribe@googlegroups.com.
Hi JamesI'm trying 'mvn fabric8:build fabric8:push fabric8:deploy -Ddocker.push.registry=fabric8-docker-registry.default.mydomain.com'<plugin><groupId>io.fabric8</groupId><artifactId>docker-maven-plugin</artifactId>
<plugin> <groupId>io.fabric8</groupId> <artifactId>fabric8-maven-plugin</artifactId> <version>3.1.49</version> <configuration> <dockerHost>tcp://f8registry.openshift.mydomain.co:2375</dockerHost> <image>shiftwork/staffservice:latest</image> </configuration>+ docker tag staffrostering/shiftwork:1.0.60 172.30.254.212:80/staffrostering/shiftwork:1.0.60
Cannot connect to the Docker daemon. Is the docker daemon running on this host?There is no where else that we are setting the image.
--
You received this message because you are subscribed to the Google Groups "fabric8" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fabric8+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
hudson.remoting.ProxyException: groovy.lang.MissingMethodException: No signature of method: static io.fabric8.kubernetes.pipeline.Kubernetes.withPrivileged() is applicable for argument types: (java.lang.Boolean) values: [true]
Do you know how we can have a working jenkinsfile a similar to the below, that works?
#!/usr/bin/groovy
def failIfNoTests = ""
try {
failIfNoTests = ITEST_FAIL_IF_NO_TEST
} catch (Throwable e) {
failIfNoTests = "false"
}
def itestPattern = ""
try {
itestPattern = ITEST_PATTERN
} catch (Throwable e) {
itestPattern = "*KT"
}
def versionPrefix = ""
try {
versionPrefix = VERSION_PREFIX
} catch (Throwable e) {
versionPrefix = "1.0"
}
def canaryVersion = "${versionPrefix}.${env.BUILD_NUMBER}"
def utils = new io.fabric8.Utils()
node {
def envProd = 'shiftwork-production'
checkout scm
kubernetes.pod('buildpod').withImage('<ip address>:80/shiftwork/jhipster-build')
.withPrivileged(true)
.withHostPathMount('/var/run/docker.sock','/var/run/docker.sock')
.withEnvVar('DOCKER_CONFIG','/home/jenkins/.docker/')
.withSecret('jenkins-docker-cfg','/home/jenkins/.docker')
.withSecret('jenkins-maven-settings','/root/.m2')
.withServiceAccount('jenkins')
.inside {
stage 'Canary Release'
mavenCanaryRelease{
version = canaryVersion
}
stage 'Integration Test'
mavenIntegrationTest{
environment = 'Testing'
failIfNoTests = localFailIfNoTests
itestPattern = localItestPattern
}
stage 'Rolling Upgrade Production'
def rc = readFile 'target/classes/kubernetes.json'
kubernetesApply(file: rc, environment: envProd)
}
}
--
You received this message because you are subscribed to the Google Groups "fabric8" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fabric8+unsubscribe@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to fabric8+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--... roland
To unsubscribe from this group and stop receiving emails from it, send an email to fabric8+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--... roland