mirror of
https://github.com/goharbor/harbor.git
synced 2024-09-02 17:29:43 +02:00
52 lines
1.1 KiB
Bash
Executable File
52 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
echo "======================= $(date)====================="
|
|
|
|
export PATH=$PATH:/usr/local/bin
|
|
|
|
base_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
source $base_dir/common.sh
|
|
|
|
#Reset root password
|
|
value=$(ovfenv -k root_pwd)
|
|
if [ -n "$value" ]
|
|
then
|
|
echo "Resetting root password..."
|
|
printf "$value\n$value\n" | passwd root
|
|
fi
|
|
|
|
#configure SSH
|
|
configSSH
|
|
|
|
echo "Adding rules to iptables..."
|
|
addIptableRules
|
|
|
|
echo "Installing docker compose..."
|
|
installDockerCompose
|
|
|
|
#echo "Starting docker service..."
|
|
#systemctl start docker
|
|
echo "Configuring docker..."
|
|
configureDockerDNS
|
|
|
|
echo "Uncompress Harbor offline instaler tar..."
|
|
tar -zxvf $base_dir/../harbor-offline-installer*.tgz -C $base_dir/../
|
|
|
|
echo "Loading images..."
|
|
load
|
|
|
|
echo "Configuring Harbor..."
|
|
chmod 600 $base_dir/../harbor/harbor.cfg
|
|
|
|
$base_dir/firstboot_config.sh
|
|
|
|
#Start Harbor
|
|
echo "Starting Harbor..."
|
|
up
|
|
|
|
echo "Removing unneeded installation packages..."
|
|
rm $base_dir/../harbor-offline-installer*.tgz
|
|
rm $base_dir/../harbor/harbor*.tgz
|
|
|
|
echo "====================================================" |