What AWS CLI tools are installed by default on EC2 instances? - amazon-s3

I'm using an Amazon Linux EC2 instance and am wondering What AWS CLI tools are installed by default on it.
Is it just the EC2 CLI API tools? How can one tell? Also where is the preferred single location on an EC2 instance to install each of the various CLI tools (RDS, cloudwatch, etc.) if they aren't installed already?
If you might answer each of these questions I'd be greatly appreciative.

For the Amazon Linux AMI 2012.03, here's the list of installed packages.
To answer your question, here's the list of AWS tools:
aws-amitools-ec2-1.4.0.7
aws-apitools-as-1.0.61.0
aws-apitools-cfn-1.0.9
aws-apitools-common-1.1.0
aws-apitools-ec2-1.5.5.0
aws-apitools-elb-1.0.17.0
aws-apitools-iam-1.5.0
aws-apitools-mon-1.0.12.1
aws-apitools-rds-1.8.002
aws-cfn-bootstrap-1.1
aws-scripts-ses-2012.05.15
According to Amazon Linux AMI Basics:
to allow the installation of multiple versions of the API and AMI
tools, we have placed symlinks to the desired versions of these tools
in /opt/aws, as described here:
/opt/aws/bin—Symlink farm to /bin directories in each of the installed
tools directories.
/opt/aws/{apitools|amitools}—Products are installed in directories of
the form [name]-version and symlink [name] attached to the most
recently installed version.
/opt/aws/{apitools|amitools}/[name]/environment.sh—Used by
/etc/profile.d/aws-apitools-common.sh to set product-specific
environment variables (EC2_HOME, etc.).

There are no fixed standards or set rules about what is installed on AMIs in general.
Different Linux distros and different AMI publishers each decide what they want to put in their image and where.
In fact, an AMI doesn't even need to give you command line access to your instance through ssh if they don't want to.
If you have a specific AMI series in mind (Amazon Linux, Ubuntu 12.04 LTS from Canonical, CentOS 5.5 from RightScale) then update your question to include this.

For the record: the "minimal" variant of Amazon Linux does not have the full suite of CLI tools. Doing a yum install ec2-tools didn't get me what I wanted, so I just created a new instance with the non-minimal AMI. I also found that this minimal Linux isn't any more space-efficient, at least as originally configured; the additional 6 GB that would go to the root partition is left unallocated.

Related

How to download the cuDNN straight from nvidia website to my linux instance on GCP

I want to install tensorflow-gpu on my linux machine on google cloud platform. I am not using an deep learning vm gcp provide. So I installed anaconda on my linux instance and now i want to install tensorflow. I already installed nvidia drivers and cuda. They can be downloaded straight in to the cloud instances. But for cuDNN I have to download it into my local machine and then upoad it into the cloud instance. Is there a way to download that file directly from nvidia site to my cloud instance? Thank you
EDIT
CUDNN_URL="developer.download.nvidia.com/compute/redist/cudnn/v5.1/cudnn-8.0-linux-x64-v5.1.tgz"
wget -c ${CUDNN_URL}
Using these lines of commands we can directly download cudnnv5.1 and I have seen the links for version 6.5 as well. I tried the same link by putting the version I want but it did not work. Anyone knows a way to use this CUDNN_URL to directly download cudnn v7.1 or higher directly using wget or curl but not logging into the an Nvidia account?
There was a change in the naming convention of cuDNN archives.
Since version 7.2.1, NVIDIA added the full version number into the archive name instead of the previously used short one.
That means that the resulting download link for 7.2.1 is:
https://developer.download.nvidia.com/compute/redist/cudnn/v7.2.1/cudnn-9.2-linux-x64-v7.2.1.38.tgz
instead of,
https://developer.download.nvidia.com/compute/redist/cudnn/v7.2.1/cudnn-9.2-linux-x64-v7.2.tgz
You can follow this pattern:
VERSION_FULL="8.1.0.77"
VERSION="${VERSION_FULL%.*}"
CUDA_VERSION="11.2"
OS_ARCH="linux-x64"
CUDNN_URL="https://developer.download.nvidia.com/compute/redist/cudnn/v${VERSION}/cudnn-${CUDA_VERSION}-${OS_ARCH}-v${VERSION_FULL}.tgz"
wget -c ${CUDNN_URL}
The resulting link would be:
https://developer.download.nvidia.com/compute/redist/cudnn/v8.1.0/cudnn-10.2-linux-x64-v8.1.0.77.tgz
Because you need to have a developer account to get cuDNN there are no direct links to download files.
As a workaround you can download cuDNN and other software to your local machine and then follow documentation Transferring files to instances to copy files to your VM instance:
For example, if you use Windows I'd recommend you to use WinSCP to copy files to your VM.
In addition, have a look at this article Deep Learning environment setup on Ubuntu(16.04) | CUDA, cuDNN, OpenCV(3.x), TensorFlow, Keras.
If your really concerned about(I was) data to download cuda and cudnn files to your local machine and then upload it to the gcp instance. You can set up an GUI for your GCP instance in no time. check this https://www.youtube.com/watch?v=e3RnnmcNI_E or any vnc server tutorial. After that you can directly download any file from using a web browser.

Discovering dependencies of mod_jk

We are running a large amount of old EC2 instances which are based on Amazon Linux AMI 2014.09, a pretty old version.
We have recently built mod_jk on one of them that so that we can front Tomcat with Apache Web server 2.4.
We are in the process of identifying the dependencies of this mod_jk module. Can we re-use the mod_jk.so library that we just built with newer versions of the OS? We are running a large number of instances, so we would like to cut out the whole "building binaries from sources" step, so our ideal setup would be to take the current mod_jk.so binary and deploy it in all other EC2 instances.
The question is: can we safely do it? If not, when do we need to rebuild it? For example:
Do we need to rebuild it if we decide to launch EC2 instances with the latest Amazon Linux AMI, which is 3 years newer?
Do we need to rebuild it if the Apache's version is different?
Thank you in advance,
Meletis
I have a couple of precompiled mod_jk's in order to avoid just this cases. As per my own experience, I must recompile it in this scenarios:
Different Apache version (2.2/2.4)
Apache 32/64bits
As I stated before, according to this, you should have no more than 4 built mod_jk binaries to choose the right one from.
I could not tell you wether this is a best practice (probably not), but I have use this already built mod_jk in different Linux distributions and versions of Fedora, CentOS, Red Hat and Debian.

MariaDB install OQGRAPH as DB Engine in AWS RDS

Is it possible to install OQGRAPH on a AWS RDS instance? If yes how?
Reading the installation guide: https://mariadb.com/kb/en/mariadb/installing-oqgraph/ installing OQGRAPH requires admin-access to the server - which clearly RDS does not grant.
Any ideas on how to install it anyways?
Obviously if i just run
INSTALL SONAME 'ha_oqgraph';
I do get the following Error-Message:
Can't open shared library
'/rdsdbbin/mariadb-10.0.24.R1/lib/plugin/ha_oqgraph.so' (errno: 2,
cannot open shared object file: No such file or directory)
Unfortunately it is currently not available.
According to the AWS RDS documentation the only plugin currently available for the RDS MariaDB is the Audit Plugin, which was announced only few months back.
If you still want to use MariaDB on AWS, but you are not forced to use RDS - you can have your own Instance of MariaDB (using the available Community MariaDB AMIs, or one of the AMIs provided by MariaDB, which available for CentOS, Debian and Ubuntu). This way you have full access to your server, so you will not have any problem with installing new plugins.

how to run openlaszlo 4.9.0 in ubuntu12.04?

I am Using Ubuntu 12.04 and i want to run OpenLaszlo 4.9.0 in my system. I have read many tutorial, e.g.
http://wiki.openlaszlo.org/Installing_OpenLaszlo#Installing_the_DevKit_on_Unix.2FLinux
that say that put server in JAVA_HOME but i do not know where is JAVA_HOME in Ubuntu 12.04.
I have OpenLaszlo also . But I do not know how to start server of OpenLaszlo and where to put it? or how many things required for it? please tell me. I have Red5 server,i have install java-7-openjdk.
Thanks in advance.
JAVA_HOME is an environment variable. It stores the path to java runtime environment (jre). You can have several JVMs installed on your system, of course. So JAVA_HOME defines the default one.
Setting this variable after installing Ubuntu package from the repository is a little tricky. It is discussed, for example, here:
Jenkins, specifying JAVA_HOME,
What is the correct target for the JAVA_HOME envrionment variable for a Linux OpenJDK Debian-based distribution?
OpenLaszlo is a Web-application that should be run under some application server (usually Apache TomCat or its derivatives such as IBM WebSphere Application Server Community Edition).
It is available on the off.site as a bundle that includes TomCat and also as a .war file (a servlet) that should be deployed under your application server.
In the 1st case you can extract an archive wherever you want (read carefully about file permissions). But at the moment the server starts it needs Java system files so JAVA_HOME should be already defined.

Automate CentOS installation with VMware for testing

Is is possible to automate the installation of an OS using VMware or any other virtualization product?
One of our products consists of a customized version of CentOS that installs the OS and our application on a server. It's much like any CentOS/RHEL installation where you choose a mode that corresponds to different kickstart options, and then you choose your keyboard type. The rest of the installation is automatic.
What I'd like to have is an automated system that will create a new guest VM, boot it with the ISO image of our product, start the installation (including choosing the keyboard), wait for the reboot, and then launch a set of automated tests.
I know that there are plenty of ways to automate the creation of new VM guests from existing templates/images, and I know you can use the VIX API to interact with virtual machines, but the VIX API seems to require that VMware tools is already running (which won't be the case when you're booting from the CentOS install disk).
This answer (Automating VMWare or VirtualPC) indicates that you can script VMware to boot from an ISO that does an unattended installation, but I would really like to test the same process that our customers will be using.
Another option might be to use Xen's fully-virtualized mode and see if scripting it over the serial port will work.
TIA,
Jason
I have a very very similar question, it is on superuser:
https://superuser.com/questions/36047/moving-vmware-os-image-as-primary-os-on-a-system
You can also use VirtualBox instead of VMWare. The VirtualBox SDK allows you to directly control the keyboard, the mouse the serial port and the parallel port of the guest without the virtualbox guest tools installed.
Unfortunately it doesn't offer a text console interface but the serial port can be connected to a local pipe file and that can probably be worked with just as well.
This may not be exactly what you need:
I have done something similar with a Ubuntu-based install. We used preseeding (Debian's form of kickstart), to answer all the questions during the install - providing the preseed file and the installer via tftp.
In addition to the official Ubuntu mirror we added the apt-server with our own packages in the preseed file. We put a .deb version of vmware-tools on the apt-server and added it to the packages to be installed.
The .deb of vmware tools just contained the .tar.gz and a postinstall script that would extract it to /tmp and run the vmware install script (which has a switch to be run unnattended, so it does not ask any questions).
So after the reboot vmware-tools were up and running and we could use vix to script the rest (which was not very reliable).
If you should encounter problems with running vmware-config.pl during boot, you could make a custom package that just extracts the tools and an init script that installs them on first boot, disables itself and reboots.
Maybe you can use this strategy (replacing apt by yum, preseed by kickstart and tftp by a remastered iso). If you really need to test that your users choose a keyboard in the installer (which is not very different from kickstart) this would obviously not work for you..