Browse Source
Merge pull request #453 from kacf/dockerization_fixes
Dockerization fixes
automatic_bootstrap_artifact
oleorhagen
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with
15 additions and
15 deletions
-
input/rootfs_overlay_demo/.gitkeep
-
mender-convert-modify
-
scripts/bootstrap-rootfs-overlay-demo-server.sh
-
scripts/bootstrap-rootfs-overlay-hosted-server.sh
-
scripts/bootstrap-rootfs-overlay-production-server.sh
|
|
@ -179,13 +179,13 @@ EOF |
|
|
|
run_and_log_cmd "sudo cp work/mender.conf.data work/rootfs/data/mender/mender.conf" |
|
|
|
run_and_log_cmd "sudo chmod 600 work/rootfs/data/mender/mender.conf" |
|
|
|
|
|
|
|
if [ -f resources/mender.conf ]; then |
|
|
|
if [ -f input/resources/mender.conf ]; then |
|
|
|
log_info "Installing the local mender.conf file" |
|
|
|
run_and_log_cmd "mkdir -p work/rootfs/etc/mender" |
|
|
|
run_and_log_cmd "cp resources/mender.conf work/rootfs/etc/mender" |
|
|
|
run_and_log_cmd "cp input/resources/mender.conf work/rootfs/etc/mender" |
|
|
|
run_and_log_cmd "sudo chmod 600 work/rootfs/etc/mender/mender.conf" |
|
|
|
else |
|
|
|
log_warn "No mender.conf file found in resources. Have you remembered to run the bootstrap script?" |
|
|
|
log_warn "No mender.conf file found in input/resources. Have you remembered to run the bootstrap script?" |
|
|
|
fi |
|
|
|
|
|
|
|
if [ -z "${MENDER_DEVICE_TYPE}" ]; then |
|
|
|
|
|
@ -58,8 +58,8 @@ if [ -e ${output_dir} ]; then |
|
|
|
fi |
|
|
|
|
|
|
|
mkdir -p ${output_dir}/etc/mender |
|
|
|
mkdir -p ${root_dir}/resources |
|
|
|
cat <<- EOF > ${root_dir}/resources/mender.conf |
|
|
|
mkdir -p ${root_dir}/input/resources |
|
|
|
cat <<- EOF > ${root_dir}/input/resources/mender.conf |
|
|
|
{ |
|
|
|
"ServerURL": "https://docker.mender.io", |
|
|
|
"ServerCertificate": "/etc/mender/server.crt" |
|
|
@ -81,4 +81,4 @@ wget -q "https://raw.githubusercontent.com/mendersoftware/mender/master/support/ |
|
|
|
sudo chown -R 0 ${output_dir} |
|
|
|
sudo chgrp -R 0 ${output_dir} |
|
|
|
|
|
|
|
echo "Configuration file for using Demo Mender Server written to: ${root_dir}/resources/mender.conf" |
|
|
|
echo "Configuration file for using Demo Mender Server written to: ${root_dir}/input/resources/mender.conf" |
|
|
|
|
|
@ -37,7 +37,7 @@ while (("$#")); do |
|
|
|
;; |
|
|
|
*) |
|
|
|
echo "Sorry but the provided option is not supported: $1" |
|
|
|
echo "Usage: $(basename $0) --output-dir ./rootfs_overlay_demo --tenant-token <paste your token here>" |
|
|
|
echo "Usage: $(basename $0) --output-dir ./input/rootfs_overlay_demo --tenant-token <paste your token here>" |
|
|
|
exit 1 |
|
|
|
;; |
|
|
|
esac |
|
|
@ -57,8 +57,8 @@ if [ -e ${output_dir} ]; then |
|
|
|
sudo chown -R $(id -u) ${output_dir} |
|
|
|
sudo chgrp -R $(id -g) ${output_dir} |
|
|
|
fi |
|
|
|
mkdir -p ${root_dir}/resources |
|
|
|
cat <<- EOF > ${root_dir}/resources/mender.conf |
|
|
|
mkdir -p ${root_dir}/input/resources |
|
|
|
cat <<- EOF > ${root_dir}/input/resources/mender.conf |
|
|
|
{ |
|
|
|
"ServerURL": "https://hosted.mender.io/", |
|
|
|
"TenantToken": "${tenant_token}" |
|
|
@ -68,4 +68,4 @@ EOF |
|
|
|
sudo chown -R 0 ${output_dir} |
|
|
|
sudo chgrp -R 0 ${output_dir} |
|
|
|
|
|
|
|
echo "Configuration file for using Hosted Mender written to: ${root_dir}/resources/mender.conf" |
|
|
|
echo "Configuration file for using Hosted Mender written to: ${root_dir}/input/resources/mender.conf" |
|
|
|
|
|
@ -62,24 +62,24 @@ if [ -e ${output_dir} ]; then |
|
|
|
sudo chgrp -R $(id -g) ${output_dir} |
|
|
|
fi |
|
|
|
|
|
|
|
mkdir -p ${root_dir}/resources |
|
|
|
cat <<- EOF > ${root_dir}/resources/mender.conf |
|
|
|
mkdir -p ${root_dir}/input/resources |
|
|
|
cat <<- EOF > ${root_dir}/input/resources/mender.conf |
|
|
|
{ |
|
|
|
"ServerURL": "${server_url}", |
|
|
|
EOF |
|
|
|
|
|
|
|
if [ -n "${server_cert}" ]; then |
|
|
|
cat <<- EOF >> ${root_dir}/resources/mender.conf |
|
|
|
cat <<- EOF >> ${root_dir}/input/resources/mender.conf |
|
|
|
"ServerCertificate": "/etc/mender/server.crt" |
|
|
|
EOF |
|
|
|
cp -f "${server_cert}" ${output_dir}/etc/mender/server.crt |
|
|
|
fi |
|
|
|
|
|
|
|
cat <<- EOF >> ${root_dir}/resources/mender.conf |
|
|
|
cat <<- EOF >> ${root_dir}/input/resources/mender.conf |
|
|
|
} |
|
|
|
EOF |
|
|
|
|
|
|
|
sudo chown -R 0 ${output_dir} |
|
|
|
sudo chgrp -R 0 ${output_dir} |
|
|
|
|
|
|
|
echo "Configuration file for using Production Mender Server written to: ${root_dir}/resources/mender.conf" |
|
|
|
echo "Configuration file for using Production Mender Server written to: ${root_dir}/input/resources/mender.conf" |
|
|
|