-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from dcomingore/master
Enabling unzip of download from Pivnet & README with RM for zip file
- Loading branch information
Showing
2 changed files
with
57 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,46 @@ | ||
# | ||
# Dockerfile for a GPDB SNE Sandbox Base Image | ||
# | ||
# AutoBuild setup on 2/16/16 | ||
|
||
FROM centos:6.7 | ||
MAINTAINER [email protected] | ||
|
||
#COPY ./bins/greenplum-db-4.3.7.1-build-1-RHEL5-x86_64.bin /tmp/ | ||
#COPY ./configs/* /tmp/ | ||
COPY * /tmp/ | ||
RUN echo root:pivotal | chpasswd \ | ||
&& yum install -y which tar more util-linux-ng passwd openssh-clients openssh-server ed m4; yum clean all \ | ||
&& sed -i s/"more << EOF"/"cat << EOF"/g /tmp/greenplum-db-4.3.7.1-build-1-RHEL5-x86_64.bin \ | ||
&& echo -e "yes\n\nyes\nyes\n" | /tmp/greenplum-db-4.3.7.1-build-1-RHEL5-x86_64.bin \ | ||
&& rm /tmp/greenplum-db-4.3.7.1-build-1-RHEL5-x86_64.bin \ | ||
&& cat /tmp/sysctl.conf.add >> /etc/sysctl.conf \ | ||
&& cat /tmp/limits.conf.add >> /etc/security/limits.conf \ | ||
&& rm -f /tmp/*.add \ | ||
&& echo "localhost" > /tmp/gpdb-hosts \ | ||
&& chmod 777 /tmp/gpinitsystem_singlenode \ | ||
&& hostname > ~/orig_hostname \ | ||
&& mv /tmp/run.sh /usr/local/bin/run.sh \ | ||
&& chmod +x /usr/local/bin/run.sh \ | ||
&& /usr/sbin/groupadd gpadmin \ | ||
&& /usr/sbin/useradd gpadmin -g gpadmin -G wheel \ | ||
&& echo "pivotal"|passwd --stdin gpadmin \ | ||
&& echo "gpadmin ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers \ | ||
&& mv /tmp/bash_profile /home/gpadmin/.bash_profile \ | ||
&& chown -R gpadmin: /home/gpadmin \ | ||
&& mkdir -p /gpdata/master /gpdata/segments \ | ||
&& chown -R gpadmin: /gpdata \ | ||
&& chown -R gpadmin: /usr/local/green* \ | ||
&& service sshd start \ | ||
&& su gpadmin -l -c "source /usr/local/greenplum-db/greenplum_path.sh;gpssh-exkeys -f /tmp/gpdb-hosts" \ | ||
&& su gpadmin -l -c "source /usr/local/greenplum-db/greenplum_path.sh;gpinitsystem -a -c /tmp/gpinitsystem_singlenode -h /tmp/gpdb-hosts; exit 0 "\ | ||
&& su gpadmin -l -c "export MASTER_DATA_DIRECTORY=/gpdata/master/gpseg-1;source /usr/local/greenplum-db/greenplum_path.sh;psql -d template1 -c \"alter user gpadmin password 'pivotal'\"; createdb gpadmin; exit 0" | ||
&& yum install -y unzip which tar more util-linux-ng passwd openssh-clients openssh-server ed m4; yum clean all \ | ||
&& unzip /tmp/greenplum-db-4.3.7.1-build-1-RHEL5-x86_64.zip -d /tmp/ \ | ||
&& rm /tmp/greenplum-db-4.3.7.1-build-1-RHEL5-x86_64.zip \ | ||
&& sed -i s/"more << EOF"/"cat << EOF"/g /tmp/greenplum-db-4.3.7.1-build-1-RHEL5-x86_64.bin \ | ||
&& echo -e "yes\n\nyes\nyes\n" | /tmp/greenplum-db-4.3.7.1-build-1-RHEL5-x86_64.bin \ | ||
&& cat /tmp/sysctl.conf.add >> /etc/sysctl.conf \ | ||
&& cat /tmp/limits.conf.add >> /etc/security/limits.conf \ | ||
&& rm -f /tmp/*.add \ | ||
&& echo "localhost" > /tmp/gpdb-hosts \ | ||
&& chmod 777 /tmp/gpinitsystem_singlenode \ | ||
&& hostname > ~/orig_hostname \ | ||
&& mv /tmp/run.sh /usr/local/bin/run.sh \ | ||
&& chmod +x /usr/local/bin/run.sh \ | ||
&& /usr/sbin/groupadd gpadmin \ | ||
&& /usr/sbin/useradd gpadmin -g gpadmin -G wheel \ | ||
&& echo "pivotal"|passwd --stdin gpadmin \ | ||
&& echo "gpadmin ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers \ | ||
&& mv /tmp/bash_profile /home/gpadmin/.bash_profile \ | ||
&& chown -R gpadmin: /home/gpadmin \ | ||
&& mkdir -p /gpdata/master /gpdata/segments \ | ||
&& chown -R gpadmin: /gpdata \ | ||
&& chown -R gpadmin: /usr/local/green* \ | ||
&& service sshd start \ | ||
&& su gpadmin -l -c "source /usr/local/greenplum-db/greenplum_path.sh;gpssh-exkeys -f /tmp/gpdb-hosts" \ | ||
&& su gpadmin -l -c "source /usr/local/greenplum-db/greenplum_path.sh;gpinitsystem -a -c /tmp/gpinitsystem_singlenode -h /tmp/gpdb-hosts; exit 0 "\ | ||
&& su gpadmin -l -c "export MASTER_DATA_DIRECTORY=/gpdata/master/gpseg-1;source /usr/local/greenplum-db/greenplum_path.sh;psql -d template1 -c \"alter user gpadmin password 'pivotal'\"; createdb gpadmin; exit 0" | ||
|
||
EXPOSE 5432 22 | ||
|
||
VOLUME /gpdata | ||
# Set the default command to run when starting the container | ||
|
||
CMD echo "127.0.0.1 $(cat ~/orig_hostname)" >> /etc/hosts \ | ||
&& service sshd start \ | ||
# && sysctl -p \ | ||
&& su gpadmin -l -c "/usr/local/bin/run.sh" \ | ||
&& /bin/bash | ||
&& service sshd start \ | ||
# && sysctl -p \ | ||
&& su gpadmin -l -c "/usr/local/bin/run.sh" \ | ||
&& /bin/bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# gpdb-docker | ||
Pivotal Greenplum Database Base Docker Image (4.3.7.1) | ||
|
||
# Building the Docker Image | ||
You will first need to download the Pivotal Greenplum Database 4.3.7.1 installer (.zip) located at https://network.pivotal.io/products/pivotal-gpdb and place it inside the docker working directory. | ||
|
||
cd [docker working directory] | ||
|
||
docker build -t [tag] . | ||
|
||
# Running the Docker Image | ||
docker run -i -p 5432:5432 [tag] | ||
|
||
# Container Accounts | ||
root/pivotal | ||
|
||
gpadmin/pivotal | ||
|
||
# Using psql in the Container | ||
su - gpadmin | ||
|
||
psql | ||
|
||
# Using pgadmin outside the Container | ||
Launch pgAdmin3 | ||
|
||
Create new connection using IP Address and Port # (5432) |