Install firefox on elastic beanstalk using ebextensions configuration?

I need to install firefox on my flexible beanstalk deployment. How can I use the ebextions configuration to install firefox?

I need to run headless firefox using Xvfb to take screenshots from a URL.

+4
source share
2 answers

You can use the package created by lambda-linux . The setup will look like this:

.ebextensions / firefox.config:

files:
  "/opt/elasticbeanstalk/bin/setup_firefox.sh":
    mode: "000755"
    content: |
        #!/bin/bash
        curl -X GET -o RPM-GPG-KEY-lambda-epll https://lambda-linux.io/RPM-GPG-KEY-lambda-epll
        sudo rpm --import RPM-GPG-KEY-lambda-epll
        curl -X GET -o epll-release-2015.09-1.1.ll1.noarch.rpm https://lambda-linux.io/epll-release-2015.09-1.1.ll1.noarch.rpm
        sudo yum -y install epll-release-2015.09-1.1.ll1.noarch.rpm
        sudo yum --enablerepo=epll install firefox-compat

commands:
    set_firefox:
        test: test ! -f /opt/elasticbeanstalk/.post-provisioning-complete
        command: /opt/elasticbeanstalk/bin/setup_firefox.sh

.ebextensions / 99_finalize_setup.config:

commands:
  99_write_post_provisioning_complete_file:
    command: touch /opt/elasticbeanstalk/.post-provisioning-complete
+2
source

, , , : https://lambda-linux.io/

files:
      "/opt/elasticbeanstalk/bin/setup_firefox.sh":
        mode: "000755"
        owner: root
        group: root
        content: |
            #!/bin/bash
            curl -X GET -o RPM-GPG-KEY-lambda-epll https://lambda-linux.io/RPM-GPG-KEY-lambda-epll
            sudo rpm --import RPM-GPG-KEY-lambda-epll
            curl -X GET -o epll-release-2017.03-1.2.ll1.noarch.rpm https://lambda-linux.io/epll-release-2017.03-1.2.ll1.noarch.rpm        
            sudo yum -y install epll-release-2017.03-1.2.ll1.noarch.rpm        
            sudo yum --enablerepo=epll install firefox-compat

commands:
    set_firefox:
        test: test ! -f /opt/elasticbeanstalk/.post-provisioning-complete
        command: /opt/elasticbeanstalk/bin/setup_firefox.sh
0

Source: https://habr.com/ru/post/1619178/


All Articles