Given an Arch Linux system, run the following to prepare the JuNest builder:
curl -k https://raw.githubusercontent.com/fsquillace/junest-builder/master/setup_builder.sh | bash
This will create a new user (builder
) and create the basic packages such as
droxi
used for publishing the JuNest image to Dropbox.
Access as builder user:
# ssh builder@<hostname>
$ ARCH=<one of x86, x86_64, arm>
$ git clone https://github.com/fsquillace/junest-builder.git /home/builder
$ systemctl --user daemon-reload
$ systemctl --user start junest@${ARCH}.service
To automatically generate the image as soon as the user session is opened:
$ systemctl --user enable junest@${ARCH}.service
With Digital Ocean you can create x32 or x64 JuNest builders. This procedure suppose you already have a digital ocean account.
Please, follow these steps to create a snapshot for JuNest builder:
- Create a ssh key
- Store the generated key in your pc in
~/.ssh/digitalocean_rsa
- Store the generated key in your pc in
- Go to 'Create a droplet':
- Select the options defined here
- Select the ssh key you have previously created
- You now have a full ArchLinux droplet ready!
- Install the JuNest builder:
- Ssh to the droplet:
ssh -i ~/.ssh/digitalocean_rsa root@<droplet ip>
- Execute the script:
curl -k https://raw.githubusercontent.com/fsquillace/junest-builder/master/setup_builder.sh | bash
- Access as builder user:
ssh -i ~/.ssh/digitalocean_rsa builder@<droplet ip>
- Provide the droxi access code at the end of the procedure.
droxi
poweroff
the droplet
- Ssh to the droplet:
- Create a snapshot from the created droplet
You now have the JuNest builder snapshot!
To automate the creation of JuNest images you also need:
- Create an access token from the digital ocean website
- Get the snapshot image id you have previously created:
curl -X GET -H 'Content-Type: application/json' -H 'Authorization: Bearer <access token>' "https://api.digitalocean.com/v2/images"
- Get the ssh key id you have previously created:
curl -X GET -H 'Content-Type: application/json' -H 'Authorization: Bearer <access token>' "https://api.digitalocean.com/v2/account/keys"
./start_digitalocean.sh <access token> <snapshot id> <ssh key id> <x86 or x86\_64>
Please Note: This is just a draft at the moment.
With Scaleway you can create an arm JuNest builder. This procedure suppose you already have a scaleway account.
Please, follow these steps to create a snapshot for JuNest builder:
- Create a ssh key
- Store the generated key in your pc in
~/.ssh/scaleway_rsa
- Store the generated key in your pc in
- Go to 'Create a Arch Linux server'
- Install the JuNest builder:
- Ssh to the server:
ssh -i ~/.ssh/scaleway_rsa root@<server ip>
- Execute the script:
curl -k https://raw.githubusercontent.com/fsquillace/junest-builder/master/setup_builder.sh | bash
- Provide the droxi access code at the end of the procedure.
poweroff
the server
- Ssh to the server:
- Create an image from the created server
- Shut down the server (as archive)
- From the volume, create the snapshot
- From the snapshot create the image
You now have the JuNest builder image!
To automate the creation of JuNest images you also need:
- Create an access token from the scaleway website
- Get the image id you have previously created from the scaleway website
- Get the organization id:
curl -X GET -H "X-Auth-Token: <access token>" https://account.cloud.online.net/organizations
./start_scaleway.sh <access token> <image id> <organization id> <x86 or x86\_64>