haxqer / bitbucket

The simplest docker file of Bitbucket. Support v7.21.13(lts)
25 stars 15 forks source link

Building 8.9 LTS image #3

Open voarsh2 opened 12 months ago

voarsh2 commented 12 months ago

@haxqer I'm been struggling to build the 8.9 LTS (and 8.4 LTS I'm sure) Docker image for Bitbucket.

It starts, but complains about Mesh (the distributed GIT storage) - but it is disabled and opt-in. I can run the official Docker image with no problem. FYI, GIT 2.40+ is required for 8.9.5 +

Here's my take on the Dockerfile:

FROM eclipse-temurin:11

# Include the contents of Dockerfile-jdk-git-python
RUN apt-get update \
    && apt-get upgrade -y \
    && apt-get install -y --no-install-recommends fontconfig openssh-client perl python3 python3-jinja2 tini \
    && apt-get clean autoclean && apt-get autoremove -y && rm -rf /var/lib/apt/lists/*

RUN apt-get update \
    && apt-get install -y software-properties-common \
    && add-apt-repository -y ppa:git-core/ppa \
    && apt-get update \
    && apt-get install -y git-svn  \
    && apt-get clean autoclean && apt-get autoremove -y && rm -rf /var/lib/apt/lists/*

LABEL maintainer="haxqer <haxqer666@gmail.com>" version="8.9.6"

ARG BITBUCKET_VERSION=8.9.6
ARG BITBUCKET_PRODUCT=bitbucket-software
ARG AGENT_VERSION=1.3.3
ARG MYSQL_DRIVER_VERSION=8.0.22

ENV BITBUCKET_USER=bitbucket \
    BITBUCKET_GROUP=bitbucket \
    BITBUCKET_HOME=/var/atlassian/application-data/bitbucket \
    BITBUCKET_INSTALL=/opt/atlassian/bitbucket \
    JVM_MINIMUM_MEMORY=2g \
    JVM_MAXIMUM_MEMORY=6g \
    JVM_CODE_CACHE_ARGS='-XX:InitialCodeCacheSize=2g -XX:ReservedCodeCacheSize=6g' \
    AGENT_PATH=/var/agent \
    AGENT_FILENAME=atlassian-agent.jar

ENV JAVA_OPTS="-javaagent:${AGENT_PATH}/${AGENT_FILENAME} ${JAVA_OPTS}"

RUN mkdir -p ${BITBUCKET_INSTALL} ${BITBUCKET_HOME} ${AGENT_PATH} \
&& curl -o ${AGENT_PATH}/${AGENT_FILENAME}  https://github.com/haxqer/jira/releases/download/v${AGENT_VERSION}/atlassian-agent.jar -L \
&& curl -o /tmp/atlassian.tar.gz https://product-downloads.atlassian.com/software/stash/downloads/atlassian-bitbucket-${BITBUCKET_VERSION}.tar.gz -L \
&& tar xzf /tmp/atlassian.tar.gz -C ${BITBUCKET_INSTALL}/ --strip-components 1 \
&& rm -f /tmp/atlassian.tar.gz \
&& curl -o ${BITBUCKET_INSTALL}/app/WEB-INF/lib/mysql-connector-java-${MYSQL_DRIVER_VERSION}.jar https://repo1.maven.org/maven2/mysql/mysql-connector-java/${MYSQL_DRIVER_VERSION}/mysql-connector-java-${MYSQL_DRIVER_VERSION}.jar -L

RUN export CONTAINER_USER=$BITBUCKET_USER \
&& export CONTAINER_GROUP=$BITBUCKET_GROUP \
&& groupadd -r $BITBUCKET_GROUP && useradd -r -g $BITBUCKET_GROUP $BITBUCKET_USER \
&& chown -R $BITBUCKET_USER:$BITBUCKET_GROUP ${BITBUCKET_INSTALL} ${BITBUCKET_HOME}/ ${AGENT_PATH}

VOLUME $BITBUCKET_HOME
USER $BITBUCKET_USER
WORKDIR $BITBUCKET_INSTALL
EXPOSE 7990
EXPOSE 7999

ENTRYPOINT ["/opt/atlassian/bitbucket/bin/start-bitbucket.sh", "-fg"]

Here's the error from the container:

Starting Atlassian Bitbucket as the current user

Starting the bundled search server
2023-11-15T13:14:00.428215352Z  Hint: Run start-bitbucket.sh --no-search to skip starting the bundled search server
warning: ignoring JAVA_OPTS=-Dcluster.node.name=bittesting-bitbucket-0; pass JVM parameters via OPENSEARCH_JAVA_OPTS
warning: ignoring JAVA_OPTS=-Dcluster.node.name=bittesting-bitbucket-0; pass JVM parameters via OPENSEARCH_JAVA_OPTS
2023-11-15T13:14:15.477288587Z Bundled search server started successfully
2023-11-15T13:14:15.512333837Z 
2023-11-15T13:14:15.512438975Z Bitbucket is being run with a umask that contains potentially unsafe settings.
2023-11-15T13:14:15.512475937Z The following issues were found with the mask "u=rwx,g=rx,o=rx" (0022):
2023-11-15T13:14:15.520524304Z  - Access is allowed to 'others'. It is recommended that 'others' be denied
2023-11-15T13:14:15.520696121Z    all access for security reasons.
2023-11-15T13:14:15.534687511Z The recommended umask for Bitbucket is "u=,g=w,o=rwx" (0027) and can be
2023-11-15T13:14:15.534796017Z configured in _start-webapp.sh

2023-11-15T13:14:15.540663545Z Starting Bitbucket webapp at http://localhost:7990
2023-11-15T13:14:24.594643844Z 13:14:24.552 [main] INFO com.atlassian.security.serialfilter.DeserializationFilterConfigurator - Global serial filter set to JDK 11 DeserializationFilter
2023-11-15 13:14:35,726 INFO  [main]  c.a.b.i.b.BitbucketServerApplication Starting BitbucketServerApplication v8.9.6 using Java 11.0.21 on bittesting-bitbucket-0 with PID 224 (/opt/atlassian/bitbucket/app/WEB-INF/classes started by bitbucket in /opt/atlassian/bitbucket)
2023-11-15 13:14:35,771 INFO  [main]  c.a.b.i.b.BitbucketServerApplication No active profile set, falling back to 1 default profile: "default"
2023-11-15 13:14:41,159 INFO  [main]  c.a.b.i.boot.log.BuildInfoLogger Starting Bitbucket 8.9.6 (66fe1da built on Mon Oct 09 01:23:43 UTC 2023)
2023-11-15T13:14:41.161642322Z 2023-11-15 13:14:41,160 INFO  [main]  c.a.b.i.boot.log.BuildInfoLogger JVM: Eclipse Adoptium OpenJDK 64-Bit Server VM 11.0.21+9
2023-11-15 13:14:52,387 INFO  [main]  c.a.b.i.b.BitbucketServerApplication Started BitbucketServerApplication in 25.96 seconds (JVM running for 36.829)
2023-11-15 13:15:31,233 INFO  [spring-startup]  c.a.s.internal.home.HomeLockAcquirer Successfully acquired lock on home directory /var/atlassian/application-data/bitbucket
atlassian-agent: skip verify the license.
atlassian-agent: skip license hash check
2023-11-15 13:15:53,975 INFO  [spring-startup]  c.a.s.internal.home.HomeLockAcquirer Successfully acquired lock on home directory /var/atlassian/application-data/shared-home
2023-11-15 13:16:03,637 WARN  [spring-startup]  c.h.s.d.integration.DiscoveryService [10.42.182.51]:5701 [bittesting-bitbucket] [3.12.13] Cannot fetch the current zone, ZONE_AWARE feature is disabled
2023-11-15 13:16:03,855 WARN  [spring-startup]  c.h.kubernetes.KubernetesClient Cannot fetch public IPs of Hazelcast Member PODs, you won't be able to use Hazelcast Smart Client from outside of the Kubernetes network
2023-11-15 13:17:21,684 WARN  [spring-startup]  o.s.w.c.s.XmlWebApplicationContext Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'meshHealthcheck' defined in URL [jar:file:/opt/atlassian/bitbucket/app/WEB-INF/lib/bitbucket-git-mesh-8.9.6.jar!/com/atlassian/stash/internal/scm/git/mesh/MeshHealthcheck.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'meshClient' defined in com.atlassian.stash.internal.scm.git.GitWiring$MeshWiring: Unsatisfied dependency expressed through method 'meshClient' parameter 2; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'routePropagatingClientInterceptor' defined in com.atlassian.stash.internal.scm.git.GitWiring$MeshWiring: Unsatisfied dependency expressed through method 'routePropagatingClientInterceptor' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'meshRouter' defined in com.atlassian.stash.internal.scm.git.GitWiring$MeshWiring: Unsatisfied dependency expressed through method 'meshRouter' parameter 5; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sidecarManager': Invocation of init method failed; nested exception is java.nio.file.FileSystemException: /var/atlassian/application-data/bitbucket/mesh/config/control-plane.pem: Operation not permitted
2023-11-15 13:17:22,120 INFO  [spring-startup]  c.a.s.internal.home.HomeLockAcquirer Releasing lock on /var/atlassian/application-data/shared-home
2023-11-15 13:17:22,271 INFO  [spring-startup]  c.a.s.internal.home.HomeLockAcquirer Releasing lock on /var/atlassian/application-data/bitbucket
2023-11-15 13:17:22,319 ERROR [spring-startup]  c.a.j.s.w.s.JohnsonDispatcherServlet SpringMVC dispatcher [springMvc] could not be started
2023-11-15T13:17:22.350931075Z org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'meshHealthcheck' defined in URL [jar:file:/opt/atlassian/bitbucket/app/WEB-INF/lib/bitbucket-git-mesh-8.9.6.jar!/com/atlassian/stash/internal/scm/git/mesh/MeshHealthcheck.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'meshClient' defined in com.atlassian.stash.internal.scm.git.GitWiring$MeshWiring: Unsatisfied dependency expressed through method 'meshClient' parameter 2; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'routePropagatingClientInterceptor' defined in com.atlassian.stash.internal.scm.git.GitWiring$MeshWiring: Unsatisfied dependency expressed through method 'routePropagatingClientInterceptor' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'meshRouter' defined in com.atlassian.stash.internal.scm.git.GitWiring$MeshWiring: Unsatisfied dependency expressed through method 'meshRouter' parameter 5; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sidecarManager': Invocation of init method failed; nested exception is java.nio.file.FileSystemException: /var/atlassian/application-data/bitbucket/mesh/config/control-plane.pem: Operation not permitted
2023-11-15T13:17:22.350969625Z  at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:800)
2023-11-15T13:17:22.351005333Z  at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:921)
2023-11-15T13:1
7:22.351037677Z     at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583)
2023-11-15T13:17:22.351066230Z  at javax.servlet.GenericServlet.init(GenericServlet.java:143)
    at java.base/java.lang.Thread.run(Thread.java:829)
    ... 18 frames trimmed
2023-11-15T13:17:22.351181112Z Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'meshClient' defined in com.atlassian.stash.internal.scm.git.GitWiring$MeshWiring: Unsatisfied dependency expressed through method 'meshClient' parameter 2; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'routePropagatingClientInterceptor' defined in com.atlassian.stash.internal.scm.git.GitWiring$MeshWiring: Unsatisfied dependency expressed through method 'routePropagatingClientInterceptor' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'meshRouter' defined in com.atlassian.stash.internal.scm.git.GitWiring$MeshWiring: Unsatisfied dependency expressed through method 'meshRouter' parameter 5; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sidecarManager': Invocation of init method failed; nested exception is java.nio.file.FileSystemException: /var/atlassian/application-data/bitbucket/mesh/config/control-plane.pem: Operation not permitted
2023-11-15T13:17:22.351237694Z  ... 6 common frames omitted
2023-11-15T13:17:22.351279407Z Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'routePropagatingClientInterceptor' defined in com.atlassian.stash.internal.scm.git.GitWiring$MeshWiring: Unsatisfied dependency expressed through method 'routePropagatingClientInterceptor' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'meshRouter' defined in com.atlassian.stash.internal.scm.git.GitWiring$MeshWiring: Unsatisfied dependency expressed through method 'meshRouter' parameter 5; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sidecarManager
': Invocation of init method failed; nested exception is java.nio.file.FileSystemException: /var/atlassian/application-data/bitbucket/mesh/config/control-plane.pem: Operation not permitted
2023-11-15T13:17:22.351309608Z  ... 6 common frames omitted
2023-11-15T13:17:22.351336807Z Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'meshRouter' defined in com.atlassian.stash.internal.scm.git.GitWiring$MeshWiring: Unsatisfied dependency expressed through method 'meshRouter' parameter 5; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sidecarManager': Invocation of init method failed; nested exception is java.nio.file.FileSystemException: /var/atlassian/application-data/bitbucket/mesh/config/control-plane.pem: Operation not permitted
2023-11-15T13:17:22.351362753Z  ... 6 common frames omitted
2023-11-15T13:17:22.351390613Z Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sidecarManager': Invocation of init method failed; nested exception is java.nio.file.FileSystemException: /var/atlassian/application-data/bitbucket/mesh/config/control-plane.pem: Operation not permitted
2023-11-15T13:17:22.351417883Z  at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:160)
2023-11-15T13:17:22.351444391Z  ... 5 common frames omitted
2023-11-15T13:17:22.351470129Z Caused by: java.nio.file.FileSystemException: /var/atlassian/application-data/bitbucket/mesh/config/control-plane.pem: Operation not permitted
2023-11-15T13:17:22.351503467Z  at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:100)
2023-11-15T13:17:22.351549741Z  at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
2023-11-15T13:17:22.351576903Z  at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116)
2023-11-15T13:17:22
.351603345Z     at java.base/sun.nio.fs.UnixFileAttributeViews$Posix.setMode(UnixFileAttributeViews.java:254)
2023-11-15T13:17:22.351628908Z  at java.base/sun.nio.fs.UnixFileAttributeViews$Posix.setPermissions(UnixFileAttributeViews.java:276)
2023-11-15T13:17:22.351681128Z  at java.base/java.nio.file.Files.setPosixFilePermissions(Files.java:2080)
2023-11-15T13:17:22.351711039Z  at com.atlassian.bitbucket.mesh.util.KeyUtils.write(KeyUtils.java:382)
2023-11-15T13:17:22.351737604Z  at com.atlassian.bitbucket.mesh.util.KeyUtils.writePublicKey(KeyUtils.java:260)
2023-11-15T13:17:22.351766308Z  at com.atlassian.stash.internal.scm.git.mesh.MeshLauncher.start(MeshLauncher.java:121)
2023-11-15T13:17:22.351795846Z  at com.atlassian.stash.internal.scm.git.mesh.DefaultSidecarManager.startSidecar(DefaultSidecarManager.java:261)
2023-11-15T13:17:22.351848572Z  at com.atlassian.stash.internal.scm.git.mesh.DefaultSidecarManager.internalStart(DefaultSidecarManager.java:212)
2023-11-15T13:17:22.351877783Z  at com.atlassian.stash.internal.scm.git.mesh.DefaultSidecarManager.start(DefaultSidecarManager.java:168)
2023-11-15T13:17:22.351902831Z  at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2023-11-15T13:17:22.351928729Z  at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
2023-11-15T13:17:22.351981893Z  ... 5 common frames omitted
2023-11-15 13:17:23,073 WARN  [http-nio-7990-exec-5]  c.a.j.s.w.f.BypassableDelegatingFilterProxy Bypassing [hazelcastFilter]; no Spring WebApplicationContext is available
voarsh2 commented 11 months ago

In the worse case, I will just take their official image and apply own modifications and see if that works. The only reason to build the image is to customise some aspects.

haxqer commented 11 months ago

Thank you for your efforts and sharing. Please forgive me for being extremely anxious about Confluence's security issues in the past few days. I can only take a look at it on weekends or other times

haxqer commented 11 months ago

In the worse case, I will just take their official image and apply own modifications and see if that works. The only reason to build the image is to customise some aspects.

A very nice idea. The previous leader attempted to crack the Docker image based on the official Jira/Confluence and automatically generate a license, which should have been successful. I remember he seemed to have shared it with me, but I was too busy during that time and forgot.

If the official Bitbucket image can be successfully cracked, it would be great!!!

voarsh2 commented 11 months ago

@haxqer I hope you're not confusing "that" person - I fixed Bitbucket crack issues...

And that's not what's going on here, I'm simply having issues trying to install Bitbucket using the executable download's from Atlassian.

I would still prefer to be able to build it from source.

haxqer commented 11 months ago

@voarsh2

Since 2017, I have been using the GitLab+Jira+Confluence+Jenkins toolchain, which is stable and easy to deploy. As an experienced user, I strongly recommend using GitLab instead of Bitbucket.

voarsh2 commented 11 months ago

Sorry @haxqer.... maybe I'll just... migrate to Atlassian Cloud then!? (Sarcasm).

I have used GitLab since 2020... and know perfectly how good/bad it is, and moved to Bitbucket, because.... Atlassian ecosystem fits best for my use case, since I've been in it for over 5 years.... the only thing I didn't have was Bitbucket..........

I'm not asking for you to tell ME what product I should and shouldn't be using. All I was asking is if you could help build the Bitbucket 8.9 from source, as (as like for 7.21), I've already pointed out, building from source and having the required dependencies.

So far, you've not been able to help build 8.9, and if you can't/won't then I need to do as I said and use their own image and make customisation.... which isn't exactly what I wanted. I wanted to build it myself, not wait on Atlassian to build it..........

mrkhachaturov commented 11 months ago

Hi @voarsh2!

I would be very grateful if you could help me solve a problem with activating Bitbucket!

I am able to activate the latest official Docker images of Confluence and Jira. For activation, I simply mounted the agent itself into the necessary directory in the container and added the argument 'JAVA_OPTS="-javaagent:/path/to/atlassian-agent.jar ${JAVA_OPTS}" in setenv.sh.

With Bitbucket, when I follow this instructions, I get the following error:

The following problem occurred which prevents Atlassian Bitbucket Server from starting correctly:

SpringMVC dispatcher [springMvc] could not be started."
mrkhachaturov commented 11 months ago

@voarsh2 your modified agent worked even for this version! Thank you )

CleanShot 2023-11-28 at 09 30 24@2x

CleanShot 2023-11-28 at 09 46 24@2x

voarsh2 commented 11 months ago

@voarsh2 your modified agent worked even for this version! Thank you )

CleanShot 2023-11-28 at 09 30 24@2x

CleanShot 2023-11-28 at 09 46 24@2x

@mrkhachaturov Glad my update to the agent helped you. I assume you mean this one? https://bamboo.hosttweb.com/browse/AA-AA-46/artifact/JOB1/jar/ - https://bitbucket.hosttweb.com/projects/AT/repos/atlassian-agent/browse

mrkhachaturov commented 11 months ago

Glad my update to the agent helped you. I assume you mean this one? https://bamboo.hosttweb.com/browse/AA-AA-46/artifact/JOB1/jar/` - https://bitbucket.hosttweb.com/projects/AT/repos/atlassian-agent/browse

@voarsh2 yes exactly that repo. thank you again!

Can you please suggest activation steps in ubuntu? I cannot repeat activation in production environment now )) I have docker swarm, maybe later I will go to K8S, but now I want to test the work without docker.

The only difference on test VM, first I installed 8.15.1 after updated to 8.16.0 ( dark theme ready) . On the production VM I installed 8.16.0 and cannot load java agent to environment. If I am trying to add it in the _start-web.app getting error:

The following problem occurred which prevents Atlassian Bitbucket Server from starting correctly:
SpringMVC dispatcher [springMvc] could not be started."

On the test VM I have tried so many options before I activated, that even not sure which step helped me to activate )

First added this line to start-bitbucket.sh export ATLASSIAN_DIR="/opt/atlassian/bitbucket/app/WEB-INF/lib" after entered this command on shell sudo -u atlbitbucket JAVA_OPTS="-javaagent:/opt/atlassian/atlassian-agent-jar-with-dependencies.jar" /opt/atlassian/bitbucket/8.16.0/bin/start-bitbucket.sh

After when trying to supply generated activation key, it is not working, I guess because java agent is not loaded to JAVA_OPTS.

ps aux|grep java

atlbitb+    1303  0.4  8.3 6898528 1359036 ?     Sl   02:38   1:06 /opt/atlassian/bitbucket/8.16.0/jre/bin/java -Xshare:auto -Dopensearch.networkaddress.cache.ttl=60 -Dopensearch.networkaddress.cache.negative.ttl=10 -XX:+AlwaysPreTouch -Xss1m -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djna.nosys=true -XX:-OmitStackTraceInFastThrow -XX:+ShowCodeDetailsInExceptionMessages -Dio.netty.noUnsafe=true -Dio.netty.noKeySetOptimization=true -Dio.netty.recycler.maxCapacityPerThread=0 -Dio.netty.allocator.numDirectArenas=0 -Dlog4j.shutdownHookEnabled=false -Dlog4j2.disable.jmx=true -Djava.locale.providers=SPI,COMPAT -Xms1g -Xmx1g -XX:+UseG1GC -XX:G1ReservePercent=25 -XX:InitiatingHeapOccupancyPercent=30 -Djava.io.tmpdir=/var/atlassian/application-data/bitbucket/tmp/search -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=data -XX:ErrorFile=logs/hs_err_pid%p.log -Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m -XX:MaxDirectMemorySize=536870912 -Dopensearch.path.home=/opt/atlassian/bitbucket/8.16.0/opensearch -Dopensearch.path.conf=/var/atlassian/application-data/bitbucket/shared/search/config -Dopensearch.distribution.type=tar -Dopensearch.bundled_jdk=true -cp /opt/atlassian/bitbucket/8.16.0/opensearch/lib/* org.opensearch.bootstrap.OpenSearch -d -p /var/atlassian/application-data/bitbucket/log/search/opensearch.pid
atlbitb+    1328  0.3  3.9 5622324 641348 ?      Sl   02:38   0:44 /opt/atlassian/bitbucket/8.16.0/jre/bin/java -classpath /opt/atlassian/bitbucket/8.16.0/app -Datlassian.standalone=BITBUCKET -Dbitbucket.home=/var/atlassian/application-data/bitbucket -Dbitbucket.install=/opt/atlassian/bitbucket/8.16.0 -Dcom.sun.jndi.ldap.connect.pool.timeout=300000 -Xms512m -Xmx1g -XX:+UseG1GC -Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8 -Djava.io.tmpdir=/var/atlassian/application-data/bitbucket/tmp -Djava.library.path=/opt/atlassian/bitbucket/8.16.0/lib/native;/var/atlassian/application-data/bitbucket/lib/native -XX:+IgnoreUnrecognizedVMOptions --add-opens=java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.naming/com.sun.jndi.ldap=ALL-UNNAMED com.atlassian.bitbucket.internal.launcher.BitbucketServerLauncher start
mrkhachaturov commented 11 months ago

I just need to give permission to the agent folder. image Activation works now!

voarsh2 commented 11 months ago

Glad you fixed your own problem. I usually prefer VM's/docker-compose, or even Kubernetes Helm Chart for "production" style deployments. Makes managing much easier. But up to you. :)

@voarsh2 your modified agent worked even for this version! Thank you )

CleanShot 2023-11-28 at 09 30 24@2x

CleanShot 2023-11-28 at 09 46 24@2x

Ah ha, living on the edge by not using TLS releases? They broke the 1.3.1/1.3.3 agent after 7.21.X, keeping on non-LTS versions, you might find they break it again. Feel free to let me know if that happens.

Haukinger commented 1 month ago

Are there any chances this repo (and the corresponding image) will get updated to bitbucket 8?

voarsh2 commented 1 month ago

Are there any chances this repo (and the corresponding image) will get updated to bitbucket 8?

I'm looking to build a new Dockerfile for Bitbucket 8.x soon as I am out of support

voarsh2 commented 1 month ago

I'm looking to build a new Dockerfile for Bitbucket 8.x soon as I am out of support

I've made the modifications and updated the files for supporting 8.9x and 8.19.x LTR's (https://github.com/voarsh2/bitbucket-haxqer) and will submit a PR for @haxqer - until he applies and updates for image building on Dockerhub. I've settled for building the image when the docker-compose file is ran.

I have tested and confirmed that the 8.9.x Dockerfile and docker-compose file (PostgreSQL) installs and accepts a DC licence using the updated agent.

8.9.x+ is DC only, and does not allow MYSQL DB, so people would need to setup a PostgreSQL container and use the Bitbucket DB migrator tool