AWS EC2 Parrot Linux instance - amazon-ec2

I want to deploy an AWS EC2 instance of Parrot Linux and I cannot find it in the marketplace.
I have uploaded an OVA to S3 of the latest 4.7 version and tried to import but got an error:
ClientError: Unsupported kernel version 5.0-parrot
Even when the kernel version is 4.19 (from uname -r command)
Is there a way to get Linux Parrot on AWS?

You could create a virtualbox/ virtualmachine image and then convert this to a AMI image.
Here is a write-up on how to do it. http://www.ioncannon.net/system-administration/1246/converting-from-virtualbox-or-vmware-to-ec2-now-easier-than-ever/
If you have been able to bootup your virtualbox, there should not be any issue launching an instance through AMI as well.

I have successfully imported a Parrot Home 4.7 machine to AWS.
After installing kernel version 4.15.0-65-generic and removing the stock one the image was imported without any issues.

Related

Can I install and run Memgraph on Amazon Linux?

I would like to run Memgraph on Amazon Linux. How can I install it? Are there prebuild packages specific for Amazon Linux?
For Amazon Linux you would probably need a working build for Fedora. Currently, Memgraph did not release a build for Fedora, but plans to do so soon. If possible, try installing Memgraph with Docker on Amazon Linux.
You can download the Memgraph package for Linux on the Memgraph download page. At the moment Memgraph offers installation packets for the following Linux distributions:
CentOS 7
CentOS 9
Debian 10
Debian 11
Debian 11 (ARM64/AArch64)
Ubuntu 18.04
Ubuntu 20.04
Ubuntu 22.04
On top of that, you can install Memgraph as Docker on Linux.
Also, if you want, you can deploy Memgraph using Docker or Kubernetes.
Amazon Linux is not listed and supported at the moment. Since it supports RPM packages, packages for CentOS could work but I didn't test it.

Install kubeadm in macOS

How to install kubeadm for Kubernetes in macOS. When tempting to use
brew install kubeadm
I get this error
Error: No available formula with the name "kubeadm"
==> Searching for a previously deleted formula (in the last month)..
NB : In macOS I can't use apt-get
Not sure about MAC OS
The supported platforms on their list are:
Ubuntu 16.04+
Debian 9
CentOS 7
RHEL 7
Fedora 25/26 (best-effort)
HypriotOS v1.0.1+
Container Linux (tested with 1800.6.0)
https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/
KubeAdm is not for Desktop local environment.
You can install Docker For MAC that will install the minikube environment for you.
You are not able to directly install kubeadm and set up kubernetes cluster locally on MAC OS because of docker.
Unfortunately for MAC we should have VirtualBox where Docker will run + boot2docker.
And the best option here(as #Ijaz Ahmad Khan mentioned) is to use Docker Desktop for Mac
You can use below guide to correctly configure your cluster: How to Install Kubernetes on Mac
At the moment kubernetes server components doesn't ship any Darwin OS(MAC OS) binaries so the control plane component can't directly run under MACOS. Although they ship kubectl for Darwin OS which can use any API Server to connect to and deploy the applications.
However I was able to run the Hyperkube Binary inside the container that can support the all control plane components but this would all be under docker container so that isn't essentially a Darwin OS supported Control Plane.
You can try this if you just want to use local installs:
https://github.com/kubernetes/kubernetes/tree/master/cluster/images/hyperkube
also If you are really looking to do everything in MAC , then possibly Install Hyperkit driver and that will allow you do pretty much the same thing to pull up the control plane images and built it up.
Damn, since this is 3 years old question, might be too late but you can use cluster on MacOS with using brew install kind.
Kind is short for Kubernetes IN Docker.
Here the documentation on more details about kind.
https://kind.sigs.k8s.io/

Am I required to use Amazon Linux on AWS lambda?

I am trying to zip python 2.7 code with pandas and cassandra libraries on my local windows 7 computer. From the anaconda prompt I did pip install -t 'folder location' for both pandas and cassandra and I zipped the contents - not the folder. I am getting the error Unable to import module 'lambda_function': Missing required dependencies ['numpy']. However, pandas included numpy as a dependency and it is in the zip file. zip file contents
I researched this isssue, and found Pandas & AWS Lambda the marked answer says: All static packages have to be compiled on an EC2 Amazon Linux instance.
This article that was referenced in another question Problems using MySQL with AWS Lambda in Python says to use EC2 Amazon linux and virtualenv: http://www.perrygeo.com/running-python-with-compiled-code-on-aws-lambda.html
Does this mean I am having problems because I am using my local windows 7 computer, is it required to use EC2 Amazon linux?
I believe the answer to my question is Yes, you do have to use EC2 Amazon Linux. I found this post on the AWS forum regarding the Cassandra-Driver library: https://forums.aws.amazon.com/thread.jspa?threadID=247496
I was a little unsure about how to do this but I found a great tutorial from AWS:
https://docs.aws.amazon.com/lambda/latest/dg/with-s3-example-deployment-pkg.html
I followed the instructions and created a virtualenv and downloaded everything - seems to be working. I got past that error but now it is unable to download from S3, I will create a new thread for that.

lxc-attach failed to enter the namespace - EC2 Instances

For some reason I cannot enter a docker container using Lxc-attach only on EC2 instances. This works on my local machine and on Digital Ocean (KVM) droplets but not on Amazon EC2 xen-paravirtualized Ubuntu12.04 instance. Here are the steps/errors:
root#ip-172-31-46-202:~/scalar/project/docker# lxc-ls
4074ebf985cfe09b2880a9eabbc7ad3e59283f425f64cfaa72f59f1f23661d18
root#ip-172-31-46-202:~/scalar/project/docker# lxc-attach -n 4074ebf985cfe09b2880a9eabbc7ad3e59283f425f64cfaa72f59f1f23661d18
lxc-attach: No such file or directory - failed to open '/proc/19731/ns/pid'
lxc-attach: failed to enter the namespace
Does anyone know if there is a way to resolve this issue? Here are my docker version details:
Client version: 0.7.6
Go version (client): go1.2
Git commit (client): bc3b2ec
Server version: 0.7.6
Git commit (server): bc3b2ec
Go version (server): go1.2
Last stable version: 0.7.6
Also:
lxc version: 0.7.5
What is your kernel version?
lxc-attach requires features that are not present in the native 12.04 kernel (3.5). You need at least 3.8 which IIRC is available in the backport.
As Creac suggested, the kernel was not of a high enough version. (and if I try re-deploying an AWS ubuntu image it still uses kernel 3.2)
To fix this issue, I ran the following command to get 3.8:
sudo apt-get install linux-image-generic-lts-raring linux-headers-generic-lts-raring
or you can run the following command to get 3.5
sudo apt-get install linux-image-generic-lts-quantal linux-headers-generic-lts-quantal
Please note that these commands are Ubuntu specific (as per the question) and will install the "generic" kernel rather than the "virtual" kernel, but should work. [source]
Note that I tried to update Creac's original answer with this additional information but the edit was rejected so I felt the need to create a new answer for others to use if they want.
source of where I found the commands

How can I use/install "make" on the Amazon Linux AMI for EC2?

I'm a new user of Amazon EC2.
I want to compile the pptpd package on EC2, but receive the following error:
[root#ip-10-112-xxx-xxx /]# /var/tmp/rpm-tmp.2eILT0: line 58: /usr/bin/make: No such file or directory
I searched the entire root directory tree, but make isn't available:
[root#ip-10-112-59-187 /]# find . -name "make"
./etc/mail/make
I'm wondering whether make is actually installed on the Amazon Linux AMI initially? If not, how do I install it?
Preface
The Amazon Linux AMI is (loosely) based on CentOS and a perfectly decent OS for EC2, in fact it has been tailored by Amazon for EC2 specifically:
The Amazon Linux AMI is a supported and maintained Linux image
provided by Amazon Web Services for use on Amazon Elastic Compute
Cloud (Amazon EC2). It is designed to provide a stable, secure, and
high performance execution environment for applications running on
Amazon EC2. It also includes packages that enable easy integration
with AWS, [...]. Amazon Web Services provides ongoing security and
maintenance updates to all instances running the Amazon Linux AMI. [...] [emphasis mine]
However, it is indeed not as widely used yet as some other distributions, with the most popular likely being Ubuntu due to its popularity in general and its dedicated long time tailored support of EC2 in particular (see e.g. the EC2StartersGuide, the Ubuntu Cloud Images or the convenient listing of the Ubuntu AMIs for Amazon EC2 on alestic). This yields two drawbacks:
You'll find much more examples/tutorials/etc. for EC2 based on Ubuntu, making things easier eventually.
You'll find slightly less precompiled packages available for CentOS, requiring compiling your own eventually (but see below).
Solution
That said, CentOS (and the Amazon Linux AMI in turn) uses the Yum package manager to install and update packages from CentOS (and 3rd party) Repositories (Debian/Ubuntu use the APT package manager instead - the inherent concepts are very similar though), see e.g. section Adding Packages in Amazon Linux AMI Basics:
In addition to the packages included in the Amazon Linux AMI, Amazon
provides a yum repository consisting of common Linux applications for
use inside of Amazon EC2. The Amazon Linux AMI is configured to point
to this repository by default for all yum actions. The packages can be
installed by issuing yum commands. For example:
# sudo yum install httpd
Accordingly, you can install make via yum install make (you can get a listing of all readily available packages via yum list all).
Be advised though, that you might actually not need to do that, insofar the Amazon Linux AMI has been built to be binary-compatible with the CentOS series of releases, and therefore packages built to run on CentOS should also run on the Amazon Linux AMI. [emphasis mine]
The desired package pptpd is not part of the standard repositories on CentOS either though, but it is available in the 3rd party Extra Packages for Enterprise Linux (EPEL) repository (see Letter P) - I can't comment on the viability of using this one vs. compiling your own though.
Good luck!
Make is not installed by default on Amazon Linux AMIs. However, you can install it quite easily with yum. If you choose to only install make, you might get some errors later for other packages in the compilation process. If you are going to compile software, you might want to just install all of the development tools at once.
sudo yum groupinstall "Development Tools"
sudo yum groupinstall "Development Tools"
According to the documentation: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/compile-software.html

Resources