Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1152,6 +1152,7 @@ $ scw inspect myserver | jq '.[0].public_ip.address'

### master (unreleased)

* create-image-from-http.sh: Support HTTP proxy ([#249](https://github.com/scaleway/scaleway-cli/issues/249))
* Support of `scw run --userdata=...` ([#202](https://github.com/scaleway/scaleway-cli/issues/202))
* Refactor of `scw _security-groups` ([#197](https://github.com/scaleway/scaleway-cli/issues/197))
* Support of `scw tag --arch=XXX`
Expand Down
11 changes: 10 additions & 1 deletion examples/create-image-from-http.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ IMAGE_BOOTSCRIPT=${IMAGE_BOOTSCRIPT:stable}
VOLUME_SIZE=${VOLUME_SIZE:-50GB}
KEY=$(cat ~/.ssh/id_rsa.pub | awk '{ print $1" "$2 }' | tr ' ' '_')


echo "[+] URL of the tarball: ${URL}"
echo "[+] Target name: ${NAME}"

Expand All @@ -35,6 +34,16 @@ scw exec -w "${SERVER}" 'uname -a'
echo "[+] Server is booted"


if [ -n "${SCW_GATEWAY_HTTP_PROXY}" ]; then
echo "[+] Configuring HTTP proxy"
# scw exec "${SERVER}" "echo proxy=${SCW_GATEWAY_HTTP_PROY} >> .curlrc"
(
set +x
scw exec "${SERVER}" "echo http_proxy = ${SCW_GATEWAY_HTTP_PROXY} >> .wgetrc" >/dev/null 2>/dev/null || (echo "Failed to configure HTTP proxy"; exit 1) || exit 1
)
fi


echo "[+] Formating and mounting /dev/nbd1..."
scw exec "${SERVER}" 'mkfs.ext4 /dev/nbd1 && mount /dev/nbd1 /mnt'
echo "[+] /dev/nbd1 formatted in ext4 and mounted on /mnt"
Expand Down