Skip to content

Commit

Permalink
ci: Add proxy env variables to crio service.
Browse files Browse the repository at this point in the history
Check proxy env variables are set and add them to
the crio service.

- Generate the crio service.

Fixes: clearcontainers#964

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
  • Loading branch information
jcvenegas committed Apr 3, 2018
1 parent 09de538 commit 5297604
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 16 deletions.
11 changes: 0 additions & 11 deletions .ci/data/crio.service

This file was deleted.

23 changes: 18 additions & 5 deletions .ci/install_crio.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,24 @@ echo "Set Clear containers as default runtime in CRI-O for untrusted workloads"
sudo sed -i 's/default_workload_trust = "trusted"/default_workload_trust = "untrusted"/' "$crio_config_file"
sudo sed -i 's/runtime_untrusted_workload = ""/runtime_untrusted_workload = "\/usr\/local\/bin\/cc-runtime"/' "$crio_config_file"

service_path="/etc/systemd/system"
crio_service_file="${cidir}/data/crio.service"

echo "Install crio service (${crio_service_file})"
sudo cp "${crio_service_file}" "${service_path}"
service_path="/etc/systemd/system/crio.service"

echo "Install crio service (${service_path})"
cat << EOT | sudo tee ${service_path}
[Unit]
Description=CRI-O daemon
Documentation=https://github.com/kubernetes-incubator/cri-o
[Service]
Environment="HTTP_PROXY=${http_proxy}"
Environment="HTTPS_PROXY=${https_proxy}"
ExecStart=/usr/local/bin/crio --log-level debug
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
EOT

echo "Reload systemd services"
sudo systemctl daemon-reload

0 comments on commit 5297604

Please sign in to comment.