commonjava / commonjava-images Goto Github PK
View Code? Open in Web Editor NEWContainer images for Commonjava services
Container images for Commonjava services
This issue has been documented on the Indy project in issue #1569.
Hi,
I'm trying to run the Indy image locally with Podman but without luck. When I run the following command:
podman run -p 8080:8080 -p 8081:8081 -p 8000:8000 -ti --rm --name indy quay.io/factory2/indy:2.7.2
it shows several stacktraces and errors such as the following and it's not up:
08:58:35.253 [main] ERROR org.commonjava.indy.filer.def.DefaultGalleyStorageProvider - [Indy] Can not create CacheProvider for some error.
org.commonjava.maven.galley.GalleyInitException: Create cache provider failed
at org.commonjava.maven.galley.cache.pathmapped.PathMappedCacheProviderFactory.create(PathMappedCacheProviderFactory.java:103)
at org.commonjava.indy.filer.def.DefaultGalleyStorageProvider.getCacheProvider(DefaultGalleyStorageProvider.java:404)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:88)
at org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:78)
at org.jboss.weld.injection.producer.ProducerMethodProducer.produce(ProducerMethodProducer.java:100)
at org.jboss.weld.injection.producer.AbstractMemberProducer.produce(AbstractMemberProducer.java:161)
at org.jboss.weld.bean.AbstractProducerBean.create(AbstractProducerBean.java:180)
at org.jboss.weld.context.unbound.DependentContextImpl.get(DependentContextImpl.java:70)
at org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.get(ContextualInstanceStrategy.java:100)
at org.jboss.weld.bean.ContextualInstance.get(ContextualInstance.java:50)
at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:786)
at org.jboss.weld.manager.BeanManagerImpl.getInjectableReference(BeanManagerImpl.java:886)
at org.jboss.weld.injection.FieldInjectionPoint.inject(FieldInjectionPoint.java:92)
at org.jboss.weld.util.Beans.injectBoundFields(Beans.java:358)
at org.jboss.weld.util.Beans.injectFieldsAndInitializers(Beans.java:369)
at org.jboss.weld.injection.producer.ResourceInjector$1.proceed(ResourceInjector.java:70)
at org.jboss.weld.injection.InjectionContextImpl.run(InjectionContextImpl.java:48)
at org.jboss.weld.injection.producer.ResourceInjector.inject(ResourceInjector.java:72)
at org.jboss.weld.injection.producer.BasicInjectionTarget.inject(BasicInjectionTarget.java:117)
at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:159)
at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:96)
at org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.get(ContextualInstanceStrategy.java:100)
at org.jboss.weld.bean.ContextualInstanceStrategy$ApplicationScopedContextualInstanceStrategy.get(ContextualInstanceStrategy.java:140)
at org.jboss.weld.bean.ContextualInstance.get(ContextualInstance.java:50)
at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:99)
at org.jboss.weld.bean.proxy.ProxyMethodHandler.getInstance(ProxyMethodHandler.java:125)
at org.commonjava.indy.pathmapped.cache.PathMappedMavenGACache$Proxy$_$$_WeldClientProxy.getStartupPriority(Unknown Source)
at org.commonjava.indy.action.IndyLifecycleManager$3.compare(IndyLifecycleManager.java:340)
at org.commonjava.indy.action.IndyLifecycleManager$3.compare(IndyLifecycleManager.java:336)
at java.base/java.util.TimSort.countRunAndMakeAscending(TimSort.java:355)
at java.base/java.util.TimSort.sort(TimSort.java:220)
at java.base/java.util.Arrays.sort(Arrays.java:1515)
at java.base/java.util.ArrayList.sort(ArrayList.java:1750)
at java.base/java.util.Collections.sort(Collections.java:179)
at org.commonjava.indy.action.IndyLifecycleManager.runStartupActions(IndyLifecycleManager.java:239)
at org.commonjava.indy.action.IndyLifecycleManager.start(IndyLifecycleManager.java:145)
at org.commonjava.indy.action.IndyLifecycleManager$Proxy$_$$_WeldClientProxy.start(Unknown Source)
at org.commonjava.indy.boot.jaxrs.JaxRsBooter.startLifecycle(JaxRsBooter.java:108)
at org.commonjava.propulsor.boot.Booter.start(Booter.java:278)
at org.commonjava.propulsor.boot.Booter.runAndWait(Booter.java:203)
at org.commonjava.indy.boot.jaxrs.JaxRsBooter.main(JaxRsBooter.java:66)
Caused by: com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (tried: localhost/127.0.0.1:9042 (com.datastax.driver.core.exceptions.TransportException: [localhost/127.0.0.1:9042] Cannot connect))
at com.datastax.driver.core.ControlConnection.reconnectInternal(ControlConnection.java:268)
at com.datastax.driver.core.ControlConnection.connect(ControlConnection.java:107)
at com.datastax.driver.core.Cluster$Manager.negotiateProtocolVersionAndConnect(Cluster.java:1652)
at com.datastax.driver.core.Cluster$Manager.init(Cluster.java:1571)
at com.datastax.driver.core.Cluster.init(Cluster.java:208)
at com.datastax.driver.core.Cluster.connectAsync(Cluster.java:376)
at com.datastax.driver.core.Cluster.connectAsync(Cluster.java:355)
at com.datastax.driver.core.Cluster.connect(Cluster.java:305)
at org.commonjava.storage.pathmapped.pathdb.datastax.CassandraPathDB.<init>(CassandraPathDB.java:126)
at org.commonjava.maven.galley.cache.pathmapped.PathMappedCacheProviderFactory.create(PathMappedCacheProviderFactory.java:83)
... 44 common frames omitted
Could anybody help me make it run?
I'm also looking at this but the doc looks a bit outdated:
http://commonjava.github.io/indy/user/docker.html
My podman info:
$ podman version
Client: Podman Engine
Version: 4.1.0
API Version: 4.1.0
Go Version: go1.18.2
Built: Tue May 31 01:03:28 2022
OS/Arch: linux/amd64
Currently the Indy docker file uses a user named "Indy" with id 1001.
When the same image is run in Openshift a dynamic user id is created. It means tools like whoami are broken.
sh-4.2$ whoami
whoami: cannot find name for user ID 1013040000
sh-4.2$
The image can be adapted to work elegantly with Openshift by adding dynamic user configuration. Documented here in Support Arbitrary User IDs.
The runtime container image for Indy is currently JDK8.
There is a need to switch to JDK11 to take advantage of features and flags in the newer JVM.
Hi,
After #80, now I want to deploy Indy to a K8s cluster so that it can be used as an alternative to Nexus Repo Manager. I've come up with my own primitive settings (see below) but I'd like to know your recommended settings with optionally more advanced features, such as externalised etc and data volumes.
Could you please add some documentation and/or examples on how to deploy Indy to K8s/OpenShift?
Thank you!
apiVersion: apps/v1
kind: Deployment
metadata:
name: indy
namespace: indy
spec:
selector:
matchLabels:
app: indy
template:
metadata:
labels:
app: indy
spec:
containers:
- name: indy
image: quay.io/factory2/indy:2.7.2
ports:
- name: 8080-tcp
containerPort: 8080
- name: 8081-tcp
containerPort: 8081
livenessProbe:
httpGet:
path: /api/stats/version-info
port: 8080
initialDelaySeconds: 30
periodSeconds: 3
readinessProbe:
httpGet:
path: /api/stats/version-info
port: 8080
initialDelaySeconds: 30
periodSeconds: 3
volumeMounts:
- name: indy-etc
mountPath: /opt/indy/etc/indy
initContainers:
- name: init-etc
image: busybox
command: ["sh", "-c"]
args:
- cd /tmp && wget -O etc.tar.gz https://github.com/Commonjava/indy/releases/download/indy-parent-2.7.2/indy-launcher-2.7.2-etc.tar.gz && tar -xf etc.tar.gz && mv etc/* /opt/indy/etc/indy/
volumeMounts:
- name: indy-etc
mountPath: /opt/indy/etc/indy
volumes:
- name: indy-etc
emptyDir: {}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.