Error creating ubuntu 16 container under arch - ubuntu-16.04

I am trying to install a Ubuntu container on Archlinux using LXC. I am following this guide:https://gist.github.com/manoj23/8a35849697945896cdaef77927c695a7
After I run this command:
lxc-create --name=ubuntu-16 --template=ubuntu -- --release xenial --arch amd64
I get the following error:
Bad template: ubuntu
Error creating container ubuntu-16
Why is this happening?

It says in the error. Bad template.
You can see that in the current version of lxc there is no ubuntu template. The gist is probably for the previous version.
The LXC documentation does not really have any clear examples of using their updated method. The Ubunu LXC documentation does though. https://help.ubuntu.com/lts/serverguide/lxc.html

Related

(GVM) 10 on Alpine issue

While installing GVM10 on Alpine (Linux alp 5.4.12-1-virt) I get the following error after the command:
apk add gvmd gnutls-utils openvas-scanner greenbone-security-assistant python3 redis
ERROR: unsatisfiable constraints:
openvas-scanner (missing):
required by: world[openvas-scanner]
I'm actually sticking to this guide:
https://wiki.alpinelinux.org/wiki/Setting_up_GVM10
What should I do in order to solve the problem?
Thanks a lot
The openvas-scanner package is no longer available in Alpine version 3.11:
openvas-scanner on Alpine 3.11
openvas-scanner on Alpine 3.10 (6.0.0-r3)
The simplest solution is downgrading the Alpine base image to 3.10 (if you're running a Docker image and free to pick a different base). However, using an older Alpine base is not an ideal solution.
Alternatively, you can work around this limitation by installing openvas-scanner of the Alpine 3.10 repo:
apk add gvmd gnutls-utils greenbone-security-assistant python3 redis
apk add openvas-scanner --repository=http://dl-cdn.alpinelinux.org/alpine/v3.10/community
This seems to be working currently on Alpine 3.11.
It has the side of downgrading several gvm packages (below), but otherwise there are no installation issues.
(1/24) Downgrading gvm-libs (11.0.0-r1 -> 10.0.0-r1)
(2/24) Downgrading greenbone-security-assistant (9.0.0-r0 -> 8.0.0-r4)
(4/24) Downgrading gvmd (9.0.0-r1 -> 8.0.0-r3)

How snapcraft nodejs plugin handle the Node.js environment when you create an app snap for different OS?

I'm try to understand how the nodejs plugin i'm using to create snap node.js app handle the Node.js environment ? Example in this application :
parts:
webserver:
source: .
plugin: nodejs
nodejs-version: "12.13.1"
nodejs-package-manager: "yarn"
nodejs-yarn-version: "v1.21.1"
I'm defining to use Node.js v12.13.1 and Yarn v1.21.1 lunching the snapcraft commands:
snapcraft clean
snapcraft --debug
snap install my-snap-file.snap --dangerous
Now i'm able to run the command/service on my machine (amd64 Ubuntu 16.04 LTS) with Node.js v12.2.0 installed but i cant find the node.js env not in multipass instance not in another machine with installed Ubuntu Core 18, i mean i can't run command as node --version and so on and even the snap app doesn't work neither command neither service.
Other problem i've discovered digging in the Ubuntu Core 18 env installed on RaspBerry Pi3 is : When i've installed my snap with nodejs app in the folder /snap//bin i cannot run the ./node exec ! i get the error :
./node: 1: ./node: Syntax error: "(" unexpected
My questions are :
Why i get the ./node error ?
my-snap-file.snap bundle the Node.js v12.3.1 inside the mysnap ?
how i can test the node.js is working with the right version in multipass and other machine where i've installed only the snap bundling node.js ?
THks
Thanks to forum.snapcraft.io i've solved the issue ... i'm posting here to help people to solve these kind of issues too. This error is due to the snap that is NOT build on the actual target architecture you want to run it on. Make sure you build eg. armhf (raspberry pi3) actually on an armhf architecture device.
architectures:
- build-on: amd64
run-on: [amd64, armhf]
here you tell snapcraft that building on amd64 produces binary snaps that can run on amd64 and armhf … which is indeed not true (since building on amd64 will pull in only amd64 binaries). i’d drop that statement completely and make sure to build the armhf version on an armhf device (or on build.snapcraft.io). (Credits Ogra)
Read the Link about architectures in snapcraft.yaml
https://forum.snapcraft.io/t/architectures/4972

Elastic Beanstalk application deployment fails from EBExtension failing to install

We're using Elastic Beanstalk, (Postgres, Node.js running on 64bit Amazon Linux/3.2.0) and I woke up today to a Severe Health warning, causing all requests to respond with a 502 Bad Gateway. I haven't manually deployed since 4/9/19, so not sure why this happened all of a sudden.
The original error we got was:
Application deployment failed at 2019-04-18T15:39:51Z with exit status 1 and error: Package listed in EBExtension failed to install.
Yum does not have postgresql96-devel available for installation.
The repo I inherited is a little untidy, and I found instance of postgres96-devel in three different files:
.ebextensions/config.yml
.ebextensions/proxy.config
proxy.config
My config.yml file looks like:
packages:
rpm:
postgresql: https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-6-x86_64/pgdg-ami201503-96-9.6-2.noarch.rpm
yum:
postgresql96-devel: []
perl-CPAN: []
I noticed the rpm link returns a 404, and when looking for a better url, I saw this warning on the Postgres RPM page:
As of 15 April 2019, there is only one repository RPM per distro, and
it includes repository information for all available PostgreSQL
releases
What I've tried:
Redeploying the last successful build from 4/9/19
Changing the config.yml file to look like
// obviously I'm thrashing here
packages:
rpm:
postgresql: https://download.postgresql.org/pub/repos/yum/11/redhat/rhel-6-x86_64/pgdg-redhat-repo-latest.noarch.rpm
yum:
postgresql11-devel: []
perl-CPAN: []
According to this AWS support article, I terminated the instance and let EB bring up a new instance.
With all these trials + redeploying, I still seeing errors like:
Application deployment failed at 2019-04-18T17:40:41Z with exit status 1 and error: Package listed in EBExtension failed to install.
Yum does not have postgresql96-devel available for installation.
Incorrect application version "app-v1_4_1-190418_084747" (deployment
98). Expected version "app-v1_4_1-190409_140626" (deployment 104).
Process default has been unhealthy for 42 minutes
(Target.FailedHealthChecks).
I'm not sure why it's complaining about postgres96-devel since I changed my config file to point to postgres11-devel.
Any ideas how to get things back up and running?
I was able to get everything back up and running. Here's what I think happened.
Our prod instances were running Linux 3.2. This did not contain the correct rpm package, so it relied on the rpm link from config.yml.
That url broke as of 4/15/19, so when EB went to deploy and pull that RPM, it failed, causing the entire deployment to fail.
The fix was to simply downgrade the yum package from postresql96-devel to postgres95-devel. Linux 3.2's yum directory contained postgres95-devel, so the deployment was able to skip going out to the internet to download the rpm (which at this point was broken).
You can install the PostgreSQL 9.6 using the amazon-linux-extra tool:
(if using docker, in a Dockerfile: )
RUN amazon-linux-extras install postgresql9.6

error: SERVER does not appear in AM_CONDITIONAL

I am trying to install Lustre on CentOS 7. I followed this link. When I try to run sh ./autogen.sh to generate the configure script I get the above error as illustrated below.
[root#localhost lustre-release]# sh ./autogen.sh
configure.ac:10: installing 'config/config.guess'
configure.ac:10: installing 'config/config.sub'
configure.ac:12: installing 'config/install-sh'
configure.ac:12: installing 'config/missing'
autoMakefile.am:127: error: SERVER does not appear in AM_CONDITIONAL
libcfs/libcfs/autoMakefile.am: installing 'config/depcomp'
Does anyone know how I can resolve this?
To build lustre from git use "autogen.sh" in the top level directory to setup the build environment:
$ bash autogen.sh
libcfs/libcfs/autoMakefile.am: installing 'config/depcomp'
$
Did you try downloading a pre-built package from https://downloads.whamcloud.com/public/lustre/ ? That is usually the easiest compared to building your own.
If you want to build your own Lustre code, which version of the source are you using? The latest code is available at git.whamcloud.com. Most users should use the LTS release (b2_10 branch currently), but if you are doing new development you should use the master branch.

MongoDB: installation error on amazon linux 2

I am trying to install mongodb 4 into an amazonlinux:2018.03 docker container. I followed these instructions. I managed to install only one package: mongodb-org, but I failed to install the rest of it: mongos, server, shell, tools.
The error I am give is the following:
Error: Package: mongodb-org-mongos-4.0.2-1.amzn2.x86_64
(mongodb-org-4.0)
Requires: libc.so.6(GLIBC_2.18)(64bit)
There is a libc.so.6 in /lib64 pointing to /lib64/libc-2.17.so
Any help would be appreciated. Thank you.
It looks like you're using an AmazonLinux 2 MongoDB package within an AmazonLinux 1 container. You should try using the MongoDB 4.0.2 package for AmazonLinux 1.
Cloud9 runs on the old Amazon linux instance, so you may run into this problem using the IDE. This is how I got it working for myself on Cloud9 running in an Amazon Linux instance:
File named "mongodb-org-4.2.repo"
[mongodb-org-4.2]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/amazon/2013.03/mongodb-org/4.2/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-4.2.asc
Then I ran the following in the same directory as that file:
sudo cp ./mongodb-org-4.2.repo /etc/yum.repos.d/mongodb-org-4.2.repo
sudo yum install -y mongodb-org
I had a similar issue but I followed this installation guide here; https://www.attosol.com/how-to-install-mongodb-in-aws-linux-step-by-step
You can get a more appropriate repo on this link https://www.mongodb.org/dl/linux/x86_64-amazon . My suggestion is that you experiment with the two most recent ones and see what works.