Skip to content

Commit

Permalink
changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriele Cerfoglio authored and Gabriele Cerfoglio committed May 22, 2017
1 parent ed2ca64 commit 511950a
Show file tree
Hide file tree
Showing 21 changed files with 20 additions and 20 deletions.
Binary file added server/.DS_Store
Binary file not shown.
34 changes: 15 additions & 19 deletions server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,10 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
RUN cp /usr/lib/jvm/zulu-8-amd64/jre/lib/security/US_export_policy.jar /usr/lib/jvm/zulu-8-amd64/jre/lib/security/local_policy.jar

COPY bin/* /usr/bin/
RUN curl -sfL https://github.com/containous/traefik/releases/download/v1.1.0/traefik_linux-amd64 > /usr/bin/traefik \
&& chmod +x /usr/bin/traefik

ENV CATTLE_HOME /var/lib/cattle
ENV DEFAULT_CATTLE_API_UI_INDEX //releases.rancher.com/ui/1.3.5
#ENV DEFAULT_CATTLE_API_UI_INDEX //releases.rancher.com/ui/1.5.7
ENV DEFAULT_CATTLE_API_UI_INDEX //github.com/Cerfoglg/ui/raw/master/dist/static/1.6.4
ENV CATTLE_API_UI_URL //releases.rancher.com/api-ui/1.0.8
ENV CATTLE_DB_CATTLE_DATABASE mysql
ENV CATTLE_USE_LOCAL_ARTIFACTS true
Expand All @@ -40,22 +39,22 @@ COPY target/*static.tar.gz /s6-statics/

EXPOSE 8080
ENV CATTLE_HOST_API_PROXY_MODE embedded
ENV CATTLE_RANCHER_SERVER_VERSION v1.4.0-rc2
ENV CATTLE_RANCHER_COMPOSE_VERSION v0.12.2-rc1
ENV CATTLE_RANCHER_SERVER_VERSION fiware
ENV CATTLE_RANCHER_COMPOSE_VERSION v0.12.3
ENV DEFAULT_CATTLE_RANCHER_COMPOSE_LINUX_URL https://releases.rancher.com/compose/${CATTLE_RANCHER_COMPOSE_VERSION}/rancher-compose-linux-amd64-${CATTLE_RANCHER_COMPOSE_VERSION}.tar.gz
ENV DEFAULT_CATTLE_RANCHER_COMPOSE_DARWIN_URL https://releases.rancher.com/compose/${CATTLE_RANCHER_COMPOSE_VERSION}/rancher-compose-darwin-amd64-${CATTLE_RANCHER_COMPOSE_VERSION}.tar.gz
ENV DEFAULT_CATTLE_RANCHER_COMPOSE_WINDOWS_URL https://releases.rancher.com/compose/${CATTLE_RANCHER_COMPOSE_VERSION}/rancher-compose-windows-386-${CATTLE_RANCHER_COMPOSE_VERSION}.zip
ENV CATTLE_RANCHER_CLI_VERSION v0.4.1
ENV CATTLE_RANCHER_CLI_VERSION v0.5.0
ENV DEFAULT_CATTLE_RANCHER_CLI_LINUX_URL https://releases.rancher.com/cli/${CATTLE_RANCHER_CLI_VERSION}/rancher-linux-amd64-${CATTLE_RANCHER_CLI_VERSION}.tar.gz
ENV DEFAULT_CATTLE_RANCHER_CLI_DARWIN_URL https://releases.rancher.com/cli/${CATTLE_RANCHER_CLI_VERSION}/rancher-darwin-amd64-${CATTLE_RANCHER_CLI_VERSION}.tar.gz
ENV DEFAULT_CATTLE_RANCHER_CLI_WINDOWS_URL https://releases.rancher.com/cli/${CATTLE_RANCHER_CLI_VERSION}/rancher-windows-386-${CATTLE_RANCHER_CLI_VERSION}.zip
ENV DEFAULT_CATTLE_CATALOG_URL='{"catalogs":{"community":{"url":"https://git.rancher.io/community-catalog.git","branch":"master"},"library":{"url":"https://git.rancher.io/rancher-catalog.git","branch":"v1.4.0-rc2"}}}'
#ENV DEFAULT_CATTLE_CATALOG_URL=community=https://git.rancher.io/community-catalog.git,library=https://git.rancher.io/rancher-catalog.git
ENV DEFAULT_CATTLE_CATALOG_URL='{"catalogs":{"community":{"url":"https://git.rancher.io/community-catalog.git","branch":"master"},"library":{"url":"https://git.rancher.io/rancher-catalog.git","branch":"master"}}}'


EXPOSE 3306
ENV CATTLE_CATTLE_VERSION v0.176.1
ADD https://github.com/rancherio/cattle/releases/download/${CATTLE_CATTLE_VERSION}/cattle.jar /usr/share/cattle/
ENV CATTLE_CATTLE_VERSION v0.177.8
#ADD https://github.com/rancherio/cattle/releases/download/${CATTLE_CATTLE_VERSION}/cattle.jar /usr/share/cattle/
ADD https://github.com/Cerfoglg/cattle/raw/master/dist/artifacts/cattle.jar /usr/share/cattle/

RUN cd / && for i in $(ls /s6-statics/*static.tar.gz);do tar -zxvf $i;done && rm -rf /s6-statics/*static.tar.gz && \
mkdir -p $CATTLE_HOME && \
Expand All @@ -65,14 +64,10 @@ RUN cd / && for i in $(ls /s6-statics/*static.tar.gz);do tar -zxvf $i;done && rm
curl -sL https:${CATTLE_API_UI_URL}.tar.gz | tar xvzf - -C /usr/share/cattle/war/api-ui --strip-components=1 && \
/usr/share/cattle/install_cattle_binaries && \
cd $CATTLE_HOME && export IFS="," && \
if echo "$DEFAULT_CATTLE_CATALOG_URL" | grep -q '^{'; then \
echo "$DEFAULT_CATTLE_CATALOG_URL" > repo.json && \
cat repo.json && \
rancher-catalog-service -validate -configFile repo.json \
;else \
for i in $DEFAULT_CATTLE_CATALOG_URL; do rancher-catalog-service -validate -catalogUrl=$i;done \
;fi && \
for i in DATA/*; do [ -d $i ] && touch $i/.nopurge; done
echo "$DEFAULT_CATTLE_CATALOG_URL" > repo.json && \
cat repo.json && \
rancher-catalog-service --sqlite --validate --config repo.json && \
for i in cache/*/*; do [ -d $i ] && touch $i/.nopurge; done

VOLUME /var/lib/mysql /var/log/mysql /var/lib/cattle

Expand All @@ -83,7 +78,8 @@ ENV DEFAULT_CATTLE_COMPOSE_EXECUTOR_EXECUTE true
ENV DEFAULT_CATTLE_CATALOG_EXECUTE true
ENV DEFAULT_CATTLE_AUTH_SERVICE_EXECUTE true
ENV DEFAULT_CATTLE_WEBHOOK_SERVICE_EXECUTE true
ENV DEFAULT_CATTLE_SECRETS_API_EXECUTE true
ENV CATTLE_RANCHER_SERVER_IMAGE rancher/server

ENTRYPOINT ["/usr/bin/entry"]
CMD ["/usr/bin/s6-svscan", "/service"]
CMD ["/usr/bin/s6-svscan", "/service"]
2 changes: 1 addition & 1 deletion server/artifacts/mysql-dump.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3717,7 +3717,7 @@ CREATE TABLE `volume` (
`image_id` bigint(20) DEFAULT NULL,
`offering_id` bigint(20) DEFAULT NULL,
`zone_id` bigint(20) DEFAULT NULL,
`uri` varchar(512) DEFAULT NULL,
`uri` varchar(255) DEFAULT NULL,
`external_id` varchar(128) DEFAULT NULL,
`access_mode` varchar(255) DEFAULT NULL,
`host_id` bigint(20) DEFAULT NULL,
Expand Down
4 changes: 4 additions & 0 deletions server/bin/entry
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ Clustering Options:
--advertise-address IP Address to which other servers will connect for full active/active HA.
This address does not need to be locally bound. Full HA requires inbound
port 9345 to be open. This setting is required for HA to be enabled.
You may use either "ipify" for fetching global IP, "awslocal" for getting an AWS local IP,
a network interface (eg: eth0), or an ip address itself (eg: 172.10.11.12)
--advertise-http-port The published HTTP port on which other servers can connect to this one.
This should be the published port of the Docker container and not the port
of the load balancer in front of Rancher. (default: 8080)
Expand Down Expand Up @@ -70,6 +72,8 @@ while [ "$#" -gt 0 ]; do
export DEFAULT_CATTLE_TRAEFIK_EXECUTE=true
if [ -e "/sys/class/net/$1" ]; then
export CATTLE_CLUSTER_ADVERTISE_ADDRESS=$(ip addr show dev $1 | grep -w inet | awk '{print $2}' | cut -f1 -d/)
elif [ "$1" = "awslocal" ]; then
export CATTLE_CLUSTER_ADVERTISE_ADDRESS=$(curl -s http://169.254.169.254/latest/meta-data/local-ipv4)
elif [ "$1" = "ipify" ]; then
export CATTLE_CLUSTER_ADVERTISE_ADDRESS=$(curl -s https://api.ipify.org)
else
Expand Down
Binary file added server/target/.DS_Store
Binary file not shown.
Empty file added server/target/.done
Empty file.
Binary file added server/target/dash-0.5.8-musl-static.tar.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added server/target/s6-2.1.0.1-musl-static-dev.tar.gz
Binary file not shown.
Binary file added server/target/s6-2.1.0.1-musl-static.tar.gz
Binary file not shown.
Binary file not shown.
Binary file added server/target/s6-dns-2.0.0.2-musl-static.tar.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added server/target/skalibs-2.2.1.0-musl-static.tar.gz
Binary file not shown.

0 comments on commit 511950a

Please sign in to comment.