Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
atlas
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dataplatform
atlas
Commits
ac573f33
Commit
ac573f33
authored
Sep 29, 2020
by
Madhan Neethiraj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-3934: Dockerfile: moved environment variables to .env file - #3
parent
9a605b66
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
50 additions
and
26 deletions
+50
-26
.env
dev-support/atlas-docker/.env
+7
-0
Dockerfile.atlas
dev-support/atlas-docker/Dockerfile.atlas
+3
-0
Dockerfile.atlas-base
dev-support/atlas-docker/Dockerfile.atlas-base
+0
-2
Dockerfile.atlas-build
dev-support/atlas-docker/Dockerfile.atlas-build
+0
-3
README.md
dev-support/atlas-docker/README.md
+15
-17
docker-compose.atlas-base.yml
dev-support/atlas-docker/docker-compose.atlas-base.yml
+2
-0
docker-compose.atlas-build.yml
dev-support/atlas-docker/docker-compose.atlas-build.yml
+6
-3
docker-compose.atlas.yml
dev-support/atlas-docker/docker-compose.atlas.yml
+4
-0
atlas-build.sh
dev-support/atlas-docker/scripts/atlas-build.sh
+13
-1
No files found.
dev-support/atlas-docker/.env
0 → 100644
View file @
ac573f33
BUILD_HOST_SRC=true
SKIPTESTS=true
GIT_URL=https://github.com/apache/atlas.git
BRANCH=master
PROFILE=dist,berkeley-solr
ATLAS_VERSION=3.0.0-SNAPSHOT
dev-support/atlas-docker/Dockerfile.atlas
View file @
ac573f33
...
...
@@ -16,6 +16,7 @@
FROM atlas-base:latest
ARG ATLAS_VERSION
COPY ./scripts/atlas.sh ${ATLAS_SCRIPTS}/
COPY ./dist/apache-atlas-${ATLAS_VERSION}-bin.tar.gz /tmp/
...
...
@@ -25,6 +26,8 @@ RUN tar xfz /tmp/apache-atlas-${ATLAS_VERSION}-bin.tar.gz --directory=/opt/ && \
rm -f /tmp/apache-atlas-${ATLAS_VERSION}-bin.tar.gz && \
mkdir -p /var/run/atlas && \
mkdir -p /var/log/atlas && \
rm -rf ${ATLAS_HOME}/logs && \
ln -s /var/log/atlas ${ATLAS_HOME}/logs && \
chown -R atlas:atlas ${ATLAS_HOME}/ /var/run/atlas/ /var/log/atlas/
ENTRYPOINT [ "/home/atlas/scripts/atlas.sh" ]
dev-support/atlas-docker/Dockerfile.atlas-base
View file @
ac573f33
...
...
@@ -17,8 +17,6 @@
FROM ubuntu:20.04
ENV ATLAS_VERSION 3.0.0-SNAPSHOT
# Install curl, wget, tzdata, Python, Java
RUN apt-get update && \
DEBIAN_FRONTEND="noninteractive" apt-get -y install curl wget tzdata \
...
...
dev-support/atlas-docker/Dockerfile.atlas-build
View file @
ac573f33
...
...
@@ -27,9 +27,6 @@ ENV PATH /usr/java/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/
# setup atlas group, and users
RUN mkdir -p /home/atlas/git && \
mkdir -p /home/atlas/.m2 && \
mkdir -p /home/atlas/scripts && \
mkdir -p /home/atlas/patches && \
mkdir -p /home/atlas/dist && \
chown -R atlas:atlas /home/atlas
COPY ./scripts/atlas-build.sh /home/atlas/scripts/
...
...
dev-support/atlas-docker/README.md
View file @
ac573f33
...
...
@@ -27,52 +27,50 @@ Docker files in this folder create docker images and run them to build Apache At
2.
Set this folder as your working directory.
3.
U
sing docker-compose is the simpler way to build and deploy Apache Atlas in containers.
3.
U
pdate environment variables in .env file, if necessary
3.
1. Execute following command to build Apache Atlas:
4.
Using docker-compose is the simpler way to build and deploy Apache Atlas in containers.
4.
1. Execute following command to build Apache Atlas:
docker-compose -f docker-compose.atlas-base.yml -f docker-compose.atlas-build.yml up
Time taken to complete the build might vary (upto an hour), depending on status of ${HOME}/.m2 directory cache.
3
.
2. Execute following command to install and start Atlas in a container:
4
.
2. Execute following command to install and start Atlas in a container:
docker-compose -f docker-compose.atlas-base.yml -f docker-compose.atlas.yml up -d
Apache Atlas will be installed at /opt/atlas/, and logs are at /
opt/atlas/log
s directory.
Apache Atlas will be installed at /opt/atlas/, and logs are at /
var/logs/atla
s directory.
4
.
Alternatively docker command can be used to build and deploy Apache Atlas.
5
.
Alternatively docker command can be used to build and deploy Apache Atlas.
4
.
1. Execute following command to build Docker image
**atlas-base**
:
5
.
1. Execute following command to build Docker image
**atlas-base**
:
docker build -f Dockerfile.atlas-base -t atlas-base .
This might take about 10 minutes to complete.
4
.
2. Execute following command to build Docker image
**atlas-build**
:
5
.
2. Execute following command to build Docker image
**atlas-build**
:
docker build -f Dockerfile.atlas-build -t atlas-build .
4.
3. Build Apache Atlas in a container with one of the following commands:
# to build from a specific branch
docker run -it --rm -v ${HOME}/.m2:/home/atlas/.m2:delegated -v $(pwd)/scripts:/home/atlas/scripts -v $(pwd)/patches:/home/atlas/patches -v $(pwd)/dist:/home/atlas/dist -e BRANCH=master -e PROFILE=dist,berkeley-solr -e SKIPTESTS=true atlas-build
5.
3. Build Apache Atlas in a container with one of the following commands:
# to build from local sources
docker run -it --rm -v ${HOME}/.m2:/home/atlas/.m2:delegated -v $(pwd)/scripts:/home/atlas/scripts -v $(pwd)/../..:/home/atlas/src:delegated -v $(pwd)/dist:/home/atlas/dist -e PROFILE=dist,berkeley-solr -e SKIPTESTS=true atlas-build
docker run -it --rm -v ${HOME}/.m2:/home/atlas/.m2:delegated -v $(pwd)/scripts:/home/atlas/scripts -v $(pwd)/../..:/home/atlas/src:delegated -v $(pwd)/patches:/home/atlas/patches -v $(pwd)/dist:/home/atlas/dist --env-file ./.env atlas-build
Time taken to complete the build might vary (upto an hour), depending on status of ${HOME}/.m2 directory cache.
4
.
4. Execute following command to build Docker image
**atlas**
:
5
.
4. Execute following command to build Docker image
**atlas**
:
docker build -f Dockerfile.atlas -t atlas .
docker build -f Dockerfile.atlas -
-build-arg ATLAS_VERSION=3.0.0-SNAPSHOT -
t atlas .
This might take about 10 minutes to complete.
4
.
8. Execute following command to install and run Atlas services in a container:
5
.
8. Execute following command to install and run Atlas services in a container:
docker run -it -d --name atlas --hostname atlas.example.com -p 21000:21000 atlas
This might take few minutes to complete.
5
.
Atlas Admin can be accessed at http://localhost:21000 (admin/atlasR0cks!)
6
.
Atlas Admin can be accessed at http://localhost:21000 (admin/atlasR0cks!)
dev-support/atlas-docker/docker-compose.atlas-base.yml
View file @
ac573f33
...
...
@@ -7,6 +7,8 @@ services:
image
:
atlas-base
networks
:
-
atlas
environment
:
-
ATLAS_VERSION
networks
:
atlas
:
dev-support/atlas-docker/docker-compose.atlas-build.yml
View file @
ac573f33
...
...
@@ -20,9 +20,12 @@ services:
depends_on
:
-
atlas-base
environment
:
BRANCH
:
'
master'
SKIPTESTS
:
'
true'
PROFILE
:
'
dist,berkeley-solr'
-
ATLAS_VERSION
-
BRANCH
-
BUILD_HOST_SRC
-
GIT_URL
-
PROFILE
-
SKIPTESTS
networks
:
atlas
:
dev-support/atlas-docker/docker-compose.atlas.yml
View file @
ac573f33
...
...
@@ -4,6 +4,8 @@ services:
build
:
context
:
.
dockerfile
:
Dockerfile.atlas
args
:
-
ATLAS_VERSION=${ATLAS_VERSION}
image
:
atlas:latest
container_name
:
atlas
hostname
:
atlas.example.com
...
...
@@ -15,6 +17,8 @@ services:
-
"
21000:21000"
depends_on
:
-
atlas-base
environment
:
-
ATLAS_VERSION
command
:
-
/home/atlas/scripts/atlas.sh
...
...
dev-support/atlas-docker/scripts/atlas-build.sh
View file @
ac573f33
...
...
@@ -38,12 +38,24 @@ else
ARG_SKIPTESTS
=
"-DskipTests=
${
SKIPTESTS
}
"
fi
if
[
"
${
BUILD_HOST_SRC
}
"
==
""
]
then
BUILD_HOST_SRC
=
true
fi
export
MAVEN_OPTS
=
"-Xms2g -Xmx2g"
export
M2
=
/home/atlas/.m2
if
[
-f
/home/atlas/src/pom.xml
]
if
[
"
${
BUILD_HOST_SRC
}
"
==
"true"
]
then
if
[
!
-f
/home/atlas/src/pom.xml
]
then
echo
"ERROR: BUILD_HOST_SRC=
${
BUILD_HOST_SRC
}
, but /home/atlas/src/pom.xml is not found "
exit
1
fi
echo
"Building from /home/atlas/src"
cd
/home/atlas/src
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment