Open naphta opened 7 years ago
@moul I'm trying to build an image and I'm running into the same issue.
scw --region=ams1 run image-builder
make image_on_local
Instance is spawn in par1
Can you try to run this
$ scw --region=ams1 run image-builder
$ export SCW_TARGET_REGION=ams1
$ make image_on_local
If it does not work, we will need to update this script to add an optional region parameter https://github.com/scaleway/scaleway-cli/blob/master/examples/create-image-from-http.sh
And then add a new REGION parameter here https://github.com/scaleway/image-tools/blob/master/builder/docker-rules.mk#L183
Specifying
$ export SCW_TARGET_REGION=ams1
does not work. The machine creating the image is still launched in PAR1 and the image is also pushed there. There doesn't seem to be a way to build an image to AMS1 currently.
Is there a way to clone an image from PAR1 to AMS1?
As a workaround you can get the current scw cli client and update the /tmp/create-image-from-http.sh
file.
To do that you can do something like
make
wait a couple of seconds then hit ctrl-c
to abort it.
This should have fetched /tmp/create-image-from-http.sh
for you.
apt-get update
apt-get install golang
export GOPATH=/root
GO15VENDOREXPERIMENT=1 go get -u github.com/scaleway/scaleway-cli/cmd/scw
export PATH=/root/bin:$PATH
sed -i "s/scw /scw --region=ams1 /g" /tmp/create-image-from-http.sh
make image_on_local
I have created https://github.com/scaleway/image-builder/pull/21 to raise the scw version, than it should be aware of the ams1
region.
@TobiasBales maybe it's even simpler to just download and install the scw deb package.
For amd64:
wget https://github.com/scaleway/scaleway-cli/releases/download/v1.14/scw_1.14_amd64.deb
dpkg -i scw_1.14_amd64.deb
For arm:
wget https://github.com/scaleway/scaleway-cli/releases/download/v1.14/scw_1.14_arm.deb
dpkg -i scw_1.14_arm.deb
As title really.
It's possible to spin up the docker server in AMS but the spawned server to generate the image from will turn up in PAR1 regardless.