[SAC] [OSGeo] #2534: Setup new OSMF servers with LXD

#2534: Setup new OSMF servers with LXD
---------------------------+----------------------------------------
Reporter: robe | Owner: sac@…
     Type: task | Status: new
Priority: normal | Milestone: Sysadmin Contract 2020-III
Component: Systems Admin | Keywords:
---------------------------+----------------------------------------
As mentioned here:
https://lists.osgeo.org/pipermail/sac/2020-November/012798.html
https://lists.osgeo.org/pipermail/sac/2020-November/012810.html
https://lists.osgeo.org/pipermail/sac/2020-November/012808.html

OSMF donated their two HP Proliant servers to us. OSUOSL is holding them
for us until we are ready to rebuild.

The plan is to put Ubuntu 20.04 on them and LXD. For these we will use
them as extra CI bots. I am hoping to also use them to house LXD VMS --
VMS would be useful for testing OS that don't really support
containerization or emulating architectures.

I'm thinking things like FreeBSD and ARM architecture.
LXD uses QEMU internally for hosting the VMS but you use the LXD interface
for managing them just like the lighter weight LXC containers.

Also thinking these would be useful for while we are upgrading OSGeo7 and
OSGeo3/4 for moving mission critical things or hosting something like
OpenNebula to allow projects to provision their own servers for testing
etc.

The specs as I understand it are as follows:

{{{
Stormy 01 - seems the biggest of the 2
https://web.archive.org/web/20191112203036/https://hardware.openstreetmap.org/servers/stormfly-01.openstreetmap.org/

     HP ProLiant DL360 G6
     71 GB RAM - 18 x 4GB 1333 MT/s DDR3 DIMM
     Disk Controller: HP Smart Array P410i
     Disks: 8 x 300 GB HP EG0300FAWHV
     1.64 TB RAID6 array over 8 disks
     BIOS HP version P64
}}}

{{{
Stormy 02 - Much less disk space we may want to consider replacing the
disks on this one before going too far
https://web.archive.org/web/20191112203042/https://hardware.openstreetmap.org/servers/stormfly-02.openstreetmap.org/

     HP ProLiant DL360 G6
     71 GB RAM - 18 x 4GB 1333 MT/s DDR3 DIMM
     Disk Controllers: HP Smart Array P410i
     Disks: 8 x 72 GB HP DH0072FAQRD
     410.01 GB RAID6 array over 8 disks
     BIOS HP version P64
}}}

--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/2534&gt;
OSGeo <https://osgeo.org/&gt;
OSGeo committee and general foundation issue tracker.

#2534: Setup new OSMF servers with LXD
---------------------------+---------------------------------------
Reporter: robe | Owner: sac@…
     Type: task | Status: new
Priority: major | Milestone: Sysadmin Contract 2021-I
Component: Systems Admin | Resolution:
Keywords: |
---------------------------+---------------------------------------
Changes (by robe):

* priority: normal => major

--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/2534#comment:2&gt;
OSGeo <https://osgeo.org/&gt;
OSGeo committee and general foundation issue tracker.

#2534: Setup new OSMF servers with LXD
---------------------------+----------------------------------------
Reporter: robe | Owner: sac@…
     Type: task | Status: new
Priority: major | Milestone: Sysadmin Contract 2021-II
Component: Systems Admin | Resolution:
Keywords: |
---------------------------+----------------------------------------

Comment (by robe):

osgeo9 is setup and currently oonly used for weblate (has a hop and nginx
container too)

--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/2534#comment:4&gt;
OSGeo <https://osgeo.org/&gt;
OSGeo committee and general foundation issue tracker.

#2534: Setup new osgeo8 server with LXD
---------------------------+----------------------------------------
Reporter: robe | Owner: sac@…
     Type: task | Status: new
Priority: major | Milestone: Sysadmin Contract 2022-II
Component: Systems Admin | Resolution:
Keywords: |
---------------------------+----------------------------------------
Changes (by robe):

* milestone: Sysadmin Contract 2022-I => Sysadmin Contract 2022-II

Old description:

As mentioned here:
https://lists.osgeo.org/pipermail/sac/2020-November/012798.html
https://lists.osgeo.org/pipermail/sac/2020-November/012810.html
https://lists.osgeo.org/pipermail/sac/2020-November/012808.html

OSMF donated their two HP Proliant servers to us. OSUOSL is holding them
for us until we are ready to rebuild.

The plan is to put Ubuntu 20.04 on them and LXD. For these we will use
them as extra CI bots. I am hoping to also use them to house LXD VMS --
VMS would be useful for testing OS that don't really support
containerization or emulating architectures.

I'm thinking things like FreeBSD and ARM architecture.
LXD uses QEMU internally for hosting the VMS but you use the LXD
interface for managing them just like the lighter weight LXC containers.

Also thinking these would be useful for while we are upgrading OSGeo7 and
OSGeo3/4 for moving mission critical things or hosting something like
OpenNebula to allow projects to provision their own servers for testing
etc.

The specs as I understand it are as follows:

{{{
Stormy 01 - seems the biggest of the 2
https://web.archive.org/web/20191112203036/https://hardware.openstreetmap.org/servers/stormfly-01.openstreetmap.org/

    HP ProLiant DL360 G6
    71 GB RAM - 18 x 4GB 1333 MT/s DDR3 DIMM
    Disk Controller: HP Smart Array P410i
    Disks: 8 x 300 GB HP EG0300FAWHV
    1.64 TB RAID6 array over 8 disks
    BIOS HP version P64
}}}

{{{
Stormy 02 - Much less disk space we may want to consider replacing the
disks on this one before going too far
https://web.archive.org/web/20191112203042/https://hardware.openstreetmap.org/servers/stormfly-02.openstreetmap.org/

    HP ProLiant DL360 G6
    71 GB RAM - 18 x 4GB 1333 MT/s DDR3 DIMM
    Disk Controllers: HP Smart Array P410i
    Disks: 8 x 72 GB HP DH0072FAQRD
    410.01 GB RAID6 array over 8 disks
    BIOS HP version P64
}}}

New description:

As mentioned here:
https://lists.osgeo.org/pipermail/sac/2020-November/012798.html
https://lists.osgeo.org/pipermail/sac/2020-November/012810.html
https://lists.osgeo.org/pipermail/sac/2020-November/012808.html

OSMF donated their two HP Proliant servers to us. OSUOSL is holding them
for us until we are ready to rebuild.

The plan is to put Ubuntu 20.04 on them and LXD. For these we will use
them as extra CI bots. I am hoping to also use them to house LXD VMS --
VMS would be useful for testing OS that don't really support
containerization or emulating architectures.

I'm thinking things like FreeBSD and ARM architecture.
LXD uses QEMU internally for hosting the VMS but you use the LXD interface
for managing them just like the lighter weight LXC containers.

Also thinking these would be useful for while we are upgrading OSGeo7 and
OSGeo3/4 for moving mission critical things or hosting something like
OpenNebula to allow projects to provision their own servers for testing
etc.

The specs as I understand it are as follows:

{{{
Stormy 01 - seems the biggest of the 2
https://web.archive.org/web/20191112203036/https://hardware.openstreetmap.org/servers/stormfly-01.openstreetmap.org/

     HP ProLiant DL360 G6
     71 GB RAM - 18 x 4GB 1333 MT/s DDR3 DIMM
     Disk Controller: HP Smart Array P410i
     Disks: 8 x 300 GB HP EG0300FAWHV
     1.64 TB RAID6 array over 8 disks
     BIOS HP version P64
}}}

{{{
Stormy 02 - Much less disk space we may want to consider replacing the
disks on this one before going too far
https://web.archive.org/web/20191112203042/https://hardware.openstreetmap.org/servers/stormfly-02.openstreetmap.org/

     HP ProLiant DL360 G6
     71 GB RAM - 18 x 4GB 1333 MT/s DDR3 DIMM
     Disk Controllers: HP Smart Array P410i
     Disks: 8 x 72 GB HP DH0072FAQRD
     410.01 GB RAID6 array over 8 disks
     BIOS HP version P64
}}}

Changing to oseo8 since osgeo9 is already set up and in use

--

--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/2534#comment:6&gt;
OSGeo <https://osgeo.org/&gt;
OSGeo committee and general foundation issue tracker.

#2534: Setup new osgeo8 server with LXD
---------------------------+----------------------------------------
Reporter: robe | Owner: sac@…
     Type: task | Status: closed
Priority: major | Milestone: Sysadmin Contract 2022-II
Component: Systems Admin | Resolution: fixed
Keywords: |
---------------------------+----------------------------------------
Changes (by robe):

* status: new => closed
* resolution: => fixed

Comment:

Done with setup and all done using ansible including the lvm slice for lxd
-
https://git.osgeo.org/gitea/sac/ansible-
deployment/src/branch/master/deployment/roles/osgeo8

One frustration I had is the lxc remote add doesn't work with --password.
I think that might be a bug as all I have read suggests it should work.
But only way I could get it to work was manually add it, and when prompted
for password type it in. Then delete it. At that point the client key of
the server is registered on the remote server.

You can see that with:

{{{
lxc remote switch osgeo9 #gets me into osgeo9
lxc config trust list
}}}

Ideally we should be using client tokens detailed here:
https://linuxcontainers.org/lxd/docs/master/authentication
/#authentication-token

but not sure we can automate that with ansible. If we do the prompt
thing, not sure how to get ansible to answer the prompt. Anyway I have a
TODO there saying it doesn't work -

https://git.osgeo.org/gitea/sac/ansible-
deployment/src/branch/master/deployment/roles/lxd-
host/tasks/prod_lxd_remote.yml#L15

I also have a hop setup using a new osgeo-debian-11 image I built using
ansible and stored on osgeo9. I'm sure strk will be horrified with my
ansible code (like the fact I just copied and pasted stuff from his ssh-
server role instead of defining a playbook to build hop that had an ssh-
server role), but oh well. Which is defined in this script -
https://git.osgeo.org/gitea/sac/ansible-
deployment/src/branch/master/deployment/roles/images/tasks/build-osgeo-
debian-11.yml

--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/2534#comment:7&gt;
OSGeo <https://osgeo.org/&gt;
OSGeo committee and general foundation issue tracker.