Drupal 8: Composer install issue - amazon-web-services

I have 2 AWS EC2 instances (servers).
I have same code on both servers.
On 1st server I have composer version 1.7.2. Which works FINE.
On 2nd server I have composer version 1.9.3. Which is not working fine.
So on 2nd server when I run composer install it will not install some of the modules & it is not applying some of that patches which I have applied for code.
I don't think so it is version issue.

The issue is it's missing
yum install patch

Related

How to add unavailable packages to EC2 instance?

This might be a really silly question, but I'm trying to train this model: https://github.com/Rayhane-mamah/Tacotron-2 on an AWS instance. I'm using an AWS educate account so I was unable to launch an EC2 instance with a Deep Learning AMI, instead I launched a regular Linux 2 AMI.
As per the repo's machine setup instructions, I installed python3 and pip and tensorflow onto the instance. However, I am unable to run the command:
sudo yum install -y libasound-dev portaudio19-dev libportaudio2 libportaudiocpp0 ffmpeg libav-tools
(the repo lists the command with apt-get instead of yum)
When I run that command, most of the packages are unavailable. The output I get is:
No package libasound-dev available.
No package portaudio19-dev available.
No package libportaudio2 available.
No package libportaudiocpp0 available.
No package ffmpeg available.
No package libav-tools available.
How can I install these packages onto my ec2 instance? Thanks
EDIT: I see now my issue is EC2's Linux 2 AMI is running on Centos. I would have to manually install each of these packages (I think). Might be easier to try and launch an Ubuntu server, or Linux 1 and use the docker file included in the repo.
You Can use Cloud Formation Template to install the pacakges inside EC2 .In that way whenever EC2 comes up , it will come up with all the packages.
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/deploying.applications.html

Can't find airflow to gcp hook

after installing the gcp package to my airflow(1.10.9) set-up, i tried to call on the GSheetHook
https://airflow.readthedocs.io/en/latest/_api/airflow/providers/google/suite/hooks/sheets/index.html
but i get an error No module named 'airflow.providers'.
looking into the installed python packages for airflow, i do not find the providers package.
is the gcp airflow packagge working or am i missingg a step before i am able to use it?
EDIT: I have installed the gcp package using the pip installer: pip install apache-airflow[gcp]
and here's the list of the installed packages
The "providers" package is only available in Airflow Master. We plan to release each provider as a separate packages as "backport packages", most likely in a week or two from today.
PR to do that: https://github.com/apache/airflow/pull/8807
You should be checking https://airflow.apache.org/docs/1.10.9/ for Airflow 1.10.9 docs. You are looking at the docs for "latest" which is for Master.
It looks backport packages (providers) can now be installed in v1.10* using with following pip command $pip install apache-airflow-backport-providers-PACKAGE-NAME

How do i install ddev on Digital ocean

Digital ocean has a simple way to setup Ubuntu 16.0 which comes with docker 17.10 and docker-compose 1.1.
However, due to some issues with 17.10, you might have issues working with, but ddev can still run very well on docker 17.10, just to avoid future issues, you can follow the steps in the answer below.
Digital ocean wont cost you much to set up, it comes with free 100 USD credit and spinning a new server cost 0.003/hour
To start
Register on Digital ocean
Create a new droplet(select Ubuntu 16.04), like i said in the question above, you can decide to follow one-click app installation which comes with docker && docker-compose but with old versio, but they still met the ddev requirements.
Digital ocean; how to install ddev
Your login credentials will be sent to your email
your new droplet comes with fresh Ubuntu installation and you can proceed to install docker, docker-compose and ddev
Installing docker
To install docker follow this doc to have latest docker on your machine
Installing docker compose
To install docker compose follow this doc.
Finally
Install ddev by following official ddev documentation

Installing and Enabling PHP7.1 on AWS Elastic beanstalk

Most PHP vital libraries have been mandating PHP7.1 in their releases lately and I happen to have an API staged on AWS elastic beanstalk PHP7.0 platform that I'd like to make compliant with this recent change.
Seeing as Amazon has greatly delayed this shift since December 1, 2016 release of PHP7.1, I've tried so many things to make PHP7.1 available on this AWS Elastic beanstalk platform originally intended for PHP7.0
Below is my sample upgrade script:
sudo su
yum -y remove php70
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
sudo rpm -Uvh remi-release-6*.rpm
yum-config-manager --enable remi-php71
wget ftp://195.220.108.108/linux/epel/6/x86_64/scl-utils-20120229-1.el6.x86_64.rpm
rpm -Uvh scl-utils-20120229-1.el6.x86_64.rpm
yum -y install php71
source /opt/remi/php71/enable
yum -y install php71-php-soap php71-php-bcmath php71-php-devel php-71-php-intl php71-php-mbstring php71-php-mcrypt php71-php-mysqlnd php71-php-opcache php71-php-pgsql php71-php-odbc php71-php-pecl-uuid php71-php-pecl-memcache php71-php-igbinary php71-php-oauth php71-php-xml php71-php-xmlrpc php71-php-process php71-php-apcu
But unless I run the source /opt/remi/php71/enable every time, I can't seem to get PHP71 by default as the PHP cli runtime.
In a bid to fix that, I did yum remove php70* to clean up the old PHP7.0 installation but that led to a problem with the AWS EBS deployment hook scripts.
Right now, I'm in a fix and it seems like I have to be forced to work with PHP7.0 and downgrade most of my PHP libraries. I just want to know if anyone can get me out of this messed up state.
Thank you.
Remi repository provides 2 way to install PHP 7.1
base packages (php-*) 1 repository by version, single version allowed, so you need remi-php71 repository enabled
SCL packages (php71-php-*) designed for parallel installation in remi-safe repository (which you have installed)
As explain in the FAQ.
Also see the Wizard instructions.
Amazon released a new version of Elastic beanstalk with PHP 7.1 support.
Upgrade your environment to use this configuration.

How to uninstall openjdk on amazon ec2 micro instance running Redhat Linux

I have Installed OpenJdk on my redhat instance recently. Now am in need to go for Java Jdk. I saw some sites for replacement but none working for me. Thanks in advance..
Install the JDK , then written to the terminal.
alternatives --config java
Enter the number
I work in fedora , try it in Red Hat.
Spring boot application is failed to start on AWS EC2 instance because of JDK old version is running on EC2 Instance. I have run following command to set updated version 1.8 from 1.7.
Follow command:
sudo yum install java-1.8.0
sudo /usr/sbin/alternatives --config java