Compare commits

...

47 Commits

Author SHA1 Message Date
Les De Ridder acd19b3df7 Change image name 2016-04-28 21:29:30 +02:00
Les De Ridder a65f137eb6 Update Makefile 2016-04-28 21:00:27 +02:00
Les De Ridder 8c30f40e0b Disable unused locales 2016-04-28 20:34:49 +02:00
Les De Ridder 7bca128200 Update README.md 2016-04-28 20:32:50 +02:00
Les De Ridder 50a96f0a1c Add quotes 2016-04-28 20:23:03 +02:00
Les De Ridder c354ddb1af Change the default locale to en_GB.UTF-8 2016-04-28 20:15:22 +02:00
Les De Ridder 2a88f2bc4a Use an updated base image 2016-04-28 20:12:18 +02:00
Les De Ridder 87cbffb98f Update maintainer 2016-04-28 20:11:17 +02:00
Les De Ridder 2b0ffcf98c Update README.md 2016-04-28 18:50:42 +02:00
Les De Ridder 8402b06c2f Update cleanup step 2016-04-28 18:28:40 +02:00
Les De Ridder 854a0e29bb Don't explicitly install packages that are in base 2016-04-28 17:56:55 +02:00
Les De Ridder 2d09abb977 Update the keyring before installing anything 2016-04-28 17:53:15 +02:00
Les De Ridder 1c8648b890 Update scaleway service names 2016-04-28 17:52:21 +02:00
Les De Ridder f78465d118 Remove localepurge
localepurge is not in the official Arch Linux repositories
2016-04-28 17:51:50 +02:00
Les De Ridder 721c7f0d56 Use x86-64 image instead of ARM image 2016-04-28 17:51:00 +02:00
Manfred Touron b9b3aa2f57 Update Makefile 2016-04-13 11:06:04 +02:00
Manfred Touron cb108cf4ed Merge pull request #26 from mikkeloscar/systemd-228-fix
Enable required DHCP option in systemd-networkd
2015-12-07 20:17:39 +01:00
Mikkel Oscar Lyderik 122793eeba Enable required DHCP option in systemd-networkd
Under systemd 228 the DHCP option (or another similar) seems to be
needed for systemd-networkd to startup and not halt the rest of the
startup as reported in #25
2015-12-07 17:49:57 +01:00
Manfred Touron e8dd2b6cc7 Merge pull request #23 from scaleway/moul-patch-1
Update README.md
2015-10-05 11:33:33 -04:00
Manfred Touron 5d41da94c0 Merge pull request #22 from scaleway/small-fixes
Update metadata
2015-10-05 11:32:54 -04:00
Manfred Touron 6e7d7e138c Update README.md 2015-10-02 19:15:52 +02:00
Manfred Touron a16def9eac Update metadata 2015-10-02 16:59:12 +00:00
Manfred Touron 1544da8a63 Merge pull request #19 from scaleway/moul-patch-1
Fix #18
2015-09-24 09:47:17 -04:00
Manfred Touron d52bbeb534 Fix #18 2015-09-12 01:12:35 +02:00
Manfred Touron 70aa5855f9 Merge pull request #17 from scaleway/moul-patch-1
Added image metadatas 📝
2015-09-10 16:02:21 +02:00
Manfred Touron 226376e15e Added image metadatas 📝 2015-09-10 12:37:56 +02:00
Sebastien Rannou 3e23c375a3 Removed shunit2 (upstream is dead). 2015-09-01 16:12:37 +00:00
Sebastien Rannou 70552c5dbd Removed DNS and hostname hooks (handled by the initrd). 2015-09-01 15:38:24 +00:00
Sebastien Rannou 1ffa6757fd Removed oc-add-extra-volumes service (now handled by the initrd). 2015-09-01 15:33:48 +00:00
Sebastien Rannou 10d364c568 Now regenerating machine-id on first boot. 2015-06-19 14:43:08 +00:00
Sebastien Rannou 904e177799 Gettind rid of NetworkManager. 2015-05-06 12:32:37 +00:00
Sebastien Rannou 6e64443f27 Now depending on systemd's flavor. 2015-04-17 14:45:25 +00:00
Manfred Touron edd132d2a3 s/scw-image-tools/scw-builder/g 2015-04-16 10:59:56 +02:00
Manfred Touron dadfad4dd0 Do not resolve connecting ip addresses 2015-04-08 18:35:11 +02:00
Manfred Touron fe57be2d86 Fixed build 2015-04-07 08:46:20 +00:00
Manfred Touron a12c6136c4 s/onlinelabs/scaleway/g 2015-04-07 08:17:01 +00:00
Manfred Touron 49609bce15 Merge pull request #10 from lukas2511/sbin-fix
moving custom stuff from /usr/sbin to /usr/local/sbin
2015-03-22 00:00:04 +01:00
Manfred Touron 9ae32d1579
Using oc-metadata --cached 2015-03-21 23:57:52 +01:00
Manfred Touron d36a1b0ed8
sed -i 's@/usr/sbin@/usr/local/sbin@g' patches/etc/systemd/system/*.service (Fixes #11) 2015-03-21 23:57:19 +01:00
Lukas Schauer 83aa4c93af moving custom stuff from /usr/sbin to /usr/local/sbin (/usr/sbin on archlinux is just a symlink) 2015-03-21 16:46:52 +01:00
Manfred Touron 598506016d Revert "Relabel the whole filesystem on first boot"
This reverts commit 15282c2e6d.
2015-03-16 18:22:56 +00:00
Manfred Touron 15282c2e6d Relabel the whole filesystem on first boot 2015-03-16 12:25:06 +00:00
Manfred Touron 17cb401832 Update README.md 2015-03-10 11:41:52 +01:00
Manfred Touron 8fe9a1b3d0 Using cached metadata if available 2015-03-05 17:21:07 +01:00
Manfred Touron c889456ef8 Added travis badge 2015-02-11 17:59:49 +01:00
Manfred Touron 3d6172bb91 Added bc and shunit2 dependencies (online-labs/image-tools#9) 2015-02-11 13:45:03 +00:00
Manfred Touron 71d1ba427f Removing root password (online-labs/image-tools#10) 2015-02-11 10:38:54 +00:00
18 changed files with 78 additions and 146 deletions

View File

@ -1,30 +1,30 @@
## -*- docker-image-name: "armbuild/ocs-distrib-archlinux:latest" -*-
FROM armbuild/archlinux-disk:2014-12-02
MAINTAINER Online Labs <opensource@ocs.online.net> (@online_en)
FROM derjudge/archlinux
MAINTAINER lesderid <les@lesderid.net>
# Environment
ENV OCS_BASE_IMAGE armbuild/ocs-archlinux:2014-12-02
ENV SCW_BASE_IMAGE armbuild/scw-archlinux:2014-12-02
# Update the keyring
RUN pacman -Sy --noconfirm archlinux-keyring
# Force openssl upgrade first (bad symbol issue)
RUN pacman -Sy --noconfirm --force openssl
# Install packages
RUN pacman -Sy --noconfirm \
bash-completion \
bc \
binutils \
cronie \
curl \
dhcpcd \
dnsutils \
file \
fakeroot \
htop \
iptables \
less \
localepurge \
lsb-release \
man \
mg \
nano \
nbd \
networkmanager \
ntp \
openbsd-netcat \
openssh \
@ -38,57 +38,42 @@ RUN pacman -Sy --noconfirm \
wget
# xnbd-client
RUN mkdir /tmp/build-xnbd \
&& cd /tmp/build-xnbd \
&& wget https://bitbucket.org/hirofuchi/xnbd/downloads/xnbd-0.3.0.tar.bz2 -O xnbd.tar.bz2 \
&& tar -xf xnbd.tar.bz2 \
&& cd xnbd-* \
&& pacman -Sy --noconfirm gcc automake pkg-config make \
&& cd /tmp/build-xnbd/xnbd-* \
&& ./configure --prefix=/usr/local \
&& make -j4 \
&& make install \
&& pacman -R --noconfirm gcc automake pkg-config make \
&& cd / \
&& rm -rf /tmp/build-xnbd /tmp/xnbd.tar.bz2
# Locales
RUN sed -e s/^\#en_US.UTF-8/en_US.UTF-8/ -i /etc/locale.gen \
RUN sed 's/^\([^#]\)/#\1/' -i /etc/locale.gen \
&& sed 's/^#en_US.UTF-8/en_US.UTF-8/;s/^#en_GB.UTF-8/en_GB.UTF-8/' -i /etc/locale.gen \
&& echo LANG=en_GB.UTF-8 > /etc/locale.conf \
&& locale-gen
# Patch rootfs
RUN curl -Lkq http://j.mp/scw-skeleton | FLAVORS=common,docker-based,systemd bash -e
ADD ./patches/etc/ /etc/
ADD ./patches/usr/ /usr/
# Systemd
RUN systemctl disable getty@tty1.service \
&& systemctl disable systemd-networkd.service \
&& systemctl enable NetworkManager-wait-online.service \
&& systemctl enable serial-getty@ttyS0.service \
&& systemctl enable sshd.service \
&& systemctl enable NetworkManager \
&& systemctl enable ntpdate
RUN systemctl enable \
scw-fetch-ssh-keys \
scw-sync-kernel-modules \
scw-generate-ssh-keys \
scw-gen-machine-id.service \
ntpdate.service \
sshd.service \
serial-getty@ttyS0.service \
&& systemctl mask \
getty@tty1.service
# packages upgrade
RUN pacman --noconfirm -Suy
# Patch rootfs
RUN wget -qO - http://j.mp/ocs-scripts | bash
ADD ./patches/etc/ /etc/
ADD ./patches/usr/ /usr/
# Enable Online-Labs services
RUN systemctl enable oc-ssh-keys \
&& systemctl enable oc-add-extra-volumes \
&& systemctl enable oc-sync-kernel-modules
# Remove root password
RUN passwd -d root
# Cleanup
RUN pacman-db-upgrade \
&& pacman -Rns linux-armv7 --noconfirm \
&& pacman -Sc --noconfirm \
&& rm -rf /var/cache/pacman/pkg \
&& localepurge-config && localepurge \
&& pacman-db-upgrade

View File

@ -1,6 +1,6 @@
The MIT License (MIT)
Copyright (c) 2014-2015 Online Labs
Copyright (c) 2014-2015 Scaleway
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,15 +1,18 @@
DOCKER_NAMESPACE = armbuild/
NAME = ocs-distrib-archlinux
NAME = archlinux
VERSION = latest
VERSION_ALIASES = 2014-12-02
TITLE = Archlinux
DESCRIPTION = Archlinux latest
SOURCE_URL = https://github.com/online-labs/image-archlinux
TITLE = Arch Linux
DESCRIPTION = A simple, lightweight distribution
SOURCE_URL = https://github.com/lesderid/image-archlinux
VENDOR_URL = https://www.archlinux.org/
IMAGE_VOLUME_SIZE = 50G
IMAGE_BOOTSCRIPT = latest
IMAGE_NAME = ArchLinux
## Image tools (https://github.com/online-labs/image-tools)
all: docker-rules.mk
## Image tools (https://github.com/scaleway/image-tools)
all: docker-rules.mk
docker-rules.mk:
wget -qO - http://j.mp/image-tools | bash
wget -qO - https://j.mp/scw-builder | bash
-include docker-rules.mk
## Below you can add custom makefile commands and overrides

View File

@ -1,35 +1,44 @@
Official Archlinux image on Online Labs
=======================================
# Arch Linux image on Scaleway
**Warning: this image is not yet working**
[![Build Status](https://travis-ci.org/lesderid/image-archlinux.svg?branch=master)](https://travis-ci.org/lesderid/image-archlinux)
Scripts to build the official Archlinux image on Online Labs
Scripts to build an Arch Linux (x86_64) image on Scaleway
This image is built using [Image Tools](https://github.com/online-labs/image-tools) and is based on the official [Ubuntu](https://github.com/online-labs/image-ubuntu) image.
This image is built using [Image Tools](https://github.com/scaleway/image-tools) and is based on the official [Ubuntu](https://github.com/scaleway/image-ubuntu) image.
![](https://d11xdyzr0div58.cloudfront.net/static/logos/archlinux-logo-dark-scalable.518881f04ca9.svg)
---
**This image is meant to be used on a C1 server.**
**This image is meant to be used on a VC1 server.**
We use the Docker's building system and convert it at the end to a disk image that will boot on real servers without Docker. Note that the image is still runnable as a Docker container for debug or for inheritance.
[More info](https://github.com/online-labs/image-tools#docker-based-builder)
[More info](https://github.com/scaleway/image-tools#docker-based-builder)
---
Install
-------
## Building
Build and write the image to /dev/nbd1 (see [documentation](https://doc.cloud.online.net/howto/create_image.html))
Build and add the image to [your account](https://cloud.scaleway.com/#/images):
$ make install
$ make image_on_local
Full list of commands available at: [scaleway/image-tools](https://github.com/scaleway/image-tools/#commands)
Full list of commands available at: [online-labs/image-tools](https://github.com/online-labs/image-tools/tree/master#commands)
## Testing
To test your image, run:
$ scw run --tmp-ssh-key --name="archlinux" <IMAGE_ID>
---
links
-----
## Links
- [Community: Add Archlinux ARM image](https://community.cloud.online.net/t/need-feedback-add-arch-linux-arm-image/243?u=manfred)
- [Community: New linux distributions (Debian, CoreOS, CentOS, Fedora, Arch Linux, ...)](https://community.cloud.online.net/t/official-new-linux-distributions-debian-coreos-centos-fedora-arch-linux/229?u=manfred)
---
A project by [![Scaleway](https://avatars1.githubusercontent.com/u/5185491?v=3&s=42)](https://www.scaleway.com/) and lesderid

View File

@ -1,10 +0,0 @@
#!/usr/bin/env bash
interface=$1
action=$2
if [ "$interface" = "eth0" -a "$action" = "up" ]
then
rm -f /etc/resolv.conf
ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf
fi

View File

@ -1,16 +0,0 @@
#!/usr/bin/env bash
interface=$1
action=$2
if [ "$interface" = "eth0" -a "$action" = "up" ]
then
metadata_host_name=$(/usr/local/bin/oc-metadata --cached HOSTNAME)
if [ "x$metadata_host_name" != "x" ]
then
echo $metadata_host_name > /etc/hostname
sed "/^127.0.1.1[ \t].*$/ s/.*$/127.0.1.1\t$metadata_host_name/" -i /etc/hosts
sed "/^127.0.0.1[ \t]localhost/ s/localhost.*$/localhost $metadata_host_name/" -i /etc/hosts
hostnamectl set-hostname $metadata_host_name
fi
fi

View File

@ -3,7 +3,7 @@
# - http://support.ntp.org/bin/view/Support/GettingStarted
# - https://wiki.archlinux.org/index.php/Network_Time_Protocol_daemon
server ntp.int.cloud.online.net
server ntp.int.scaleway.com
# Associate to public NTP pool servers; see http://www.pool.ntp.org/
server 0.arch.pool.ntp.org

View File

@ -112,7 +112,7 @@ PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#UseDNS yes
UseDNS no
#PidFile /run/sshd.pid
#MaxStartups 10:30:100
#PermitTunnel no

View File

@ -2,6 +2,7 @@
Name=eth0
[Network]
DHCP=yes
DNS=10.1.31.38
DNS=10.1.31.39
Domains=cloud.online.net
Domains=scaleway.com

View File

@ -1,4 +1,4 @@
# online cloud's DNS
# Scaleway's DNS
[Resolve]
DNS=10.1.31.38

View File

@ -1,10 +0,0 @@
[Unit]
Description=OCS additional volumes mounter
[Service]
ExecStart=/usr/sbin/oc-add-extra-volumes
ExecStop=/usr/sbin/oc-remove-extra-volumes
Type=forking
[Install]
WantedBy=basic.target

View File

@ -1,10 +0,0 @@
[Unit]
Description=OCS fetch ssh keys from metadata
After=NetworkManager-wait-online.service
[Service]
ExecStart=/bin/bash -c "mkdir -p /root/.ssh/ ; chmod 700 /root/.ssh ; /usr/local/bin/oc-metadata | grep SSH_PUBLIC_KEYS_.*_KEY | cut -d'=' -f 2- | tr -d \\' > /root/.ssh/authorized_keys"
Type=oneshot
[Install]
WantedBy=multi-user.target

View File

@ -1,10 +0,0 @@
[Unit]
Description=OCS fetch kernel modules from OCS mirror
After=NetworkManager-wait-online.service
[Service]
ExecStart=/usr/sbin/oc-sync-kernel-modules
Type=oneshot
[Install]
WantedBy=multi-user.target

View File

@ -1,10 +0,0 @@
[Unit]
Description=Reboot
Documentation=man:systemd-halt.service(8)
DefaultDependencies=no
Requires=shutdown.target umount.target final.target
After=shutdown.target umount.target final.target
[Service]
Type=oneshot
ExecStart=/usr/sbin/oc-nbd-disconnect-root

View File

@ -1,6 +1,6 @@
# Fetch OCS metadata
# Fetch Scaleway metadata
fetch_ocs_metadata()
fetch_scw_metadata()
{
metadata_host_name=$(/usr/local/bin/oc-metadata --cached HOSTNAME)
if [ "x$metadata_host_name" != "x" ]; then
@ -14,5 +14,5 @@ fetch_ocs_metadata()
}
if $if_up; then
fetch_ocs_metadata
fetch_scw_metadata
fi

View File

@ -4,7 +4,7 @@ METADATA_CACHE=`mktemp -u`
get_metadata() {
if [ ! -f $METADATA_CACHE ]; then
/usr/local/bin/oc-metadata > $METADATA_CACHE
/usr/local/bin/oc-metadata --cached > $METADATA_CACHE
fi
}