Skip to content

Commit

Permalink
move migration script to drgadm and keep old credentials for now.
Browse files Browse the repository at this point in the history
  • Loading branch information
jbtrystram committed Nov 17, 2022
1 parent 2b477de commit 6c1e4d7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
7 changes: 4 additions & 3 deletions credentials-migrate.sh → scripts/cmd/migrate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,11 @@ do

if [ "$hascreds" = "true" ]
then
DATA=$(echo "$DATA" | jq '.spec.authentication = .spec.credentials | del(.spec.credentials)')
DATA=$(echo "$DATA" | jq '.spec.authentication += .spec.credentials')
echo "$DATA" | drg apply -f -
progress "Device $dev updated."
else
echo "No credentials field for device $dev"
progress "No credentials field for device $dev"
fi

done
done
5 changes: 3 additions & 2 deletions scripts/drgadm
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ Usage: drgadm <command>
Drogue IoT cloud admin tool
Commands:
deploy Deploy Drogue IoT to your cluster
examples Show some examples to try
deploy Deploy Drogue IoT to your cluster
examples Show some examples to try
migrate <appId> Migrate device credentials to the new format (0.11)
EOF
exit 1
Expand Down

0 comments on commit 6c1e4d7

Please sign in to comment.