Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create services/install-gitlab.sh (fixes #2139) #2159

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
109 changes: 109 additions & 0 deletions services/install-gitlab.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
#!/bin/bash

# runs gitlab on docker
# docker run -d --hostname 192.168.86.47 -p 443:443 -p 80:80 -p 2222:22 --name gitlab -v /srv/gitlab/config:/etc/gitlab -v /srv/gitlab/logs:/var/log/gitlab -v /srv/gitlab/data:/var/opt/gitlab --privileged ulm0/gitlab

function install {
# create service directory
mkdir -p /srv/gitlab

# create yml(s)
# NEEDS REVIEW FOR FORMATTING
{
echo "version: '3.3'"
echo "services:"
echo " gitlab:"
echo " ports:"
echo " - '443:443'"
echo " - '80:80'"
echo " - '2222:22'"
echo " volumes:"
echo " - '/srv/gitlab/config:/etc/gitlab'"
echo " - '/srv/gitlab/logs:/var/log/gitlab'"
echo " - '/srv/gitlab/data:/var/opt/gitlab'"
echo " privileged: true"
echo " image: ulm0/gitlab"
} > /srv/gitlab/gitlab.yml

# create .env with default values

# add autorun
cat << EOF > /srv/gitlab/autorun
gitlab_autorun=true

if [ "$gitlab_autorun" = true ]; then
treehouses services gitlab up
fi


EOF
}

# environment var
# NEEDS REVIEW FOR ACCURACY
function uses_env {
echo false
}

# add supported arch(es)
# NEEDS TO BE CHANGED TO GITLAB
function supported_arches {
echo "armv7l"
}

# add port(s)
# NEEDS REVIEW FOR ACCURACY
function get_ports {
echo "443"
echo "80"
echo "2222"
}

# add size (in MB)
# NEEDS REVIEW FOR ACCURACY
function get_size {
echo "1982"
}

# add description
function get_description {
echo "GitLab is a web-based DevOps lifecycle tool that provides a Git-repository manager providing wiki, issue-tracking, continuous integration, and deployment pipeline features; all using an open-source license"
}

# add info
# NEEDS REVIEW FOR FORMATTING
function get_info {
echo "https://github.com/treehouses/gitlab"
echo
echo "\"GitLab <https://about.gitlab.com/> is an open core company which"
echo "develops software for the software development lifecycle used by"
echo "more than 100,000 organizations, 30 million estimated registered users,"
echo "and has an active community of more than 3000 contributors.\""
}

# add svg icon
# NEEDS TO BE CHANGED TO GITLAB
function get_icon {
cat <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<svg width="65" height="60" viewBox="0 0 210 194" class="footer-logo">
<path d="M105.0614,193.655 L105.0614,193.655 L143.7014,74.734 L66.4214,74.734 L105.0614,193.655 L105.0614,193.655 Z" fill="#E24329" class="logo-svg-shape logo-dark-orange-shape"></path>
<path d="M105.0614,193.6548 L66.4214,74.7338 L12.2684,74.7338 L105.0614,193.6548 Z" fill="#FC6D26" class="logo-svg-shape logo-orange-shape"></path>
<path d="M12.2685,74.7341 L12.2685,74.7341 L0.5265,110.8731 C-0.5445,114.1691 0.6285,117.7801 3.4325,119.8171 L105.0615,193.6551 L12.2685,74.7341 Z" fill="#FCA326" class="logo-svg-shape logo-light-orange-shape"></path>
<path d="M12.2685,74.7342 L66.4215,74.7342 L43.1485,3.1092 C41.9515,-0.5768 36.7375,-0.5758 35.5405,3.1092 L12.2685,74.7342 Z" fill="#E24329" class="logo-svg-shape logo-dark-orange-shape"></path>
<path d="M105.0614,193.6548 L143.7014,74.7338 L197.8544,74.7338 L105.0614,193.6548 Z" fill="#FC6D26" class="logo-svg-shape logo-orange-shape"></path>
<path d="M197.8544,74.7341 L197.8544,74.7341 L209.5964,110.8731 C210.6674,114.1691 209.4944,117.7801 206.6904,119.8171 L105.0614,193.6551 L197.8544,74.7341 Z" fill="#FCA326" class="logo-svg-shape logo-light-orange-shape"></path>
<path d="M197.8544,74.7342 L143.7014,74.7342 L166.9744,3.1092 C168.1714,-0.5768 173.3854,-0.5758 174.5824,3.1092 L197.8544,74.7342 Z" fill="#E24329" class="logo-svg-shape logo-dark-orange-shape"></path>
</svg>
<g>
<path style="fill:#F98012;" d="M289.6,309.8V201.5c0-22.6-9.4-34-28-34c-18.7,0-28.1,11.3-28.1,34v108.3h-55.1V201.5 c0-22.6-9.2-34-27.6-34c-18.7,0-28,11.3-28,34v108.3H67.7V195.1c0-23.6,8.2-41.5,24.6-53.6c14.4-10.8,34-16.3,58.6-16.3 c24.9,0,43.3,6.4,55.1,19.2c10.2-12.8,28.7-19.2,55.6-19.2c24.6,0,44.1,5.4,58.5,16.3c16.4,12.1,24.6,30,24.6,53.6v114.7H289.6z"></path>
<path style="fill:#F98012;" d="M965.1,309.3V0h55.2v309.3H965.1z"></path>
<path style="fill:#F98012;" d="M894.8,309.3v-18.2c-4.9,6.6-13.3,11.8-25.1,15.8c-10.5,3.6-20.5,5.4-30,5.4 c-26.3,0-47.4-9-63.3-27.1c-15.9-18-23.9-40.4-23.9-67c0-26.3,7.8-48.3,23.4-66c13.8-15.7,36.4-26.6,62.3-26.6 c29.2,0,46.3,11,56.6,23.6V0h53.7v309.3H894.8z M894.8,206.3c0-9.8-4.7-19.3-14-28.3c-9.3-9-19-13.5-28.8-13.5 c-14.1,0-25.3,5.8-33.5,17.2c-7.2,10.2-10.8,22.7-10.8,37.4c0,14.5,3.6,26.8,10.8,36.9c8.2,11.8,19.4,17.7,33.5,17.7 c8.5,0,17.8-4,27.8-12.1c10-8,15-16.3,15-24.9V206.3z"></path>
<path style="fill:#F98012;" d="M648.6,314.2c-27.9,0-51-8.9-69.2-26.6c-18.2-17.7-27.3-40.5-27.3-68.5c0-27.9,9.1-50.7,27.3-68.4 c18.2-17.7,41.3-26.6,69.2-26.6c27.9,0,51.1,8.9,69.4,26.6c18.4,17.7,27.6,40.6,27.6,68.4c0,27.9-9.2,50.7-27.6,68.5 C699.6,305.3,676.5,314.2,648.6,314.2z M648.6,168.4c-13.3,0-23.5,5-30.7,15.1c-7.1,10.1-10.7,22-10.7,35.9 c0,13.9,3.3,25.6,10,35.1c7.6,10.9,18.1,16.3,31.4,16.3c13.3,0,23.7-5.4,31.4-16.3c7-9.6,10.5-21.3,10.5-35.1 c0-13.9-3.3-25.6-10-35.1C672.8,173.7,662.2,168.4,648.6,168.4z"></path>
<path style="fill:#F98012;" d="M449.1,314.2c-27.9,0-51-8.9-69.2-26.6c-18.2-17.7-27.3-40.5-27.3-68.5c0-27.9,9.1-50.7,27.3-68.4 c18.2-17.7,41.3-26.6,69.2-26.6c27.9,0,51,8.9,69.4,26.6c18.4,17.7,27.6,40.6,27.6,68.4c0,27.9-9.2,50.7-27.6,68.5 C500.2,305.3,477,314.2,449.1,314.2z M449.1,168.4c-13.3,0-23.5,5-30.7,15.1c-7.1,10.1-10.7,22-10.7,35.9c0,13.9,3.3,25.6,10,35.1 c7.6,10.9,18.1,16.3,31.4,16.3c13.3,0,23.7-5.4,31.4-16.3c7-9.6,10.5-21.3,10.5-35.1c0-13.9-3.3-25.6-10-35.1 C473.4,173.7,462.8,168.4,449.1,168.4z"></path>
<path style="fill:#F98012;" d="M1085.6,235.9c1.2,13.1,18.2,41.4,46.3,41.4c27.3,0,40.2-15.8,40.9-22.2l58.1-0.5 c-6.3,19.4-32.1,60.6-100,60.6c-28.2,0-54.1-8.8-72.6-26.3c-18.5-17.6-27.8-40.5-27.8-68.7c0-29.2,9.3-52.4,27.8-69.7 c18.6-17.2,42.6-25.9,72.2-25.9c32.2,0,57.3,10.7,75.3,32c16.7,19.7,25.1,46.1,25.1,79.3H1085.6z M1175.7,201.9 c-2.3-11.8-7.2-21.5-14.8-29.1c-8.6-8.2-18.4-12.3-29.6-12.3c-11.5,0-21.1,3.9-28.8,11.8c-7.7,7.9-12.9,17.7-15.5,29.6H1175.7z"></path>
<path style="fill:#333333;" d="M174.7,116.9l54.7-40l-0.7-2.4C130,86.6,85.1,95.2,0,144.5l0.8,2.2l6.8,0.1 c-0.6,6.8-1.7,23.6-0.3,49c-9.4,27.3-0.2,45.9,8.4,66.1c1.4-21,1.2-44-5.2-66.9c-1.3-25.1-0.2-41.7,0.4-48.1l56.4,0.5 c0,0-0.4,17,1.7,33.1c50.4,17.7,101.1-0.1,128-43.7C189.4,128.3,174.7,116.9,174.7,116.9z"></path>
</g>
</svg>
EOF
}