What is Image pinning?

Image pinning is the ability to call a particular release version of a Packet official image, or a custom image utilizing its image tag.

How do I find the image tag? 

Current device utilizing either an official Packet image, or custom image, you can query against the metadata service from within the device: 

 $ curl -s https://metadata.packet.net/metadata | jq '.operating_system.image_tag'

The following would be the output: 


Or, if you want to travel back to a previously released version of an official Packet image, or custom image, you can obtain the image tag from our repo here. Or, your particular repo on GitHub/Lab.

Creating device with image tag via API

curl -s -H 'Content-Type: application/json' -H 'X-Auth-Token: '<ATOKEN>'' -d '{"batches":[{"hostname":"test.image.com","description":"This is my image test server","plan":"<PLAN>","operating_system":"ubuntu_16_04-baremetal_1","userdata":"#cloud-config\n#image_repo=https://somegitserver/user/image-repo.git\n#image_tag=<commit sha>","facility":"ewr1","billing_cycle":"hourly","quantity":'<HOWMANY>'}]}' -X POST https://api.packet.net/projects/<PROJECT UUID>/devices/batch

Passing image_tag through the API will pin a specific image - either an official one that Packet maintains, or a custom image that you maintain.  

Creating device with image tag via Portal

Prior to deploying your device, click 'SSH & User Data'. 

Under 'Add optional user data' the following would be required to deploy your particular version: 


Looking for More Help?

You can always reach out to us via email, live chat or return to our home page.

Did this answer your question?