Azure / pcs-cli

A CLI for deploying Azure IoT PCS
MIT License
33 stars 37 forks source link

Fix Device Simulation setup script #425

Closed dluc closed 5 years ago

dluc commented 5 years ago

Description and Motivation

  1. fix scripts to work with other shells other than Bash
  2. improve some common errors detection
  3. sync scripts in the 2 solutions, with and without hub

Change type

Checklist:


This change is Reviewable

dluc commented 5 years ago

Scripts tested and working fine. The only issue I noticed is a missing "testing" tag in the docker-compose when deploying the branch with CLI, unrelated to this PR

dluc commented 5 years ago

@ppathan yes, these 2 PRs contain improvements/fixes that we should apply to other solutions:

  1. Copy the new setup-wrapper.sh and change it to point to the relevant GitHub URL, note how it doesn't use set -ex to avoid leaking secrets
  2. In the ARM template invoke setup-wrapper.sh (instead of setup.sh) and use bash instead of sh
  3. From setup.sh take the retry logic used to install Docker and other minor improvements about error detection

Note that the setup now creates a log file under /app