Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updateDependencies: Updated GCC to 8 to support CXXABI_1.3.12 #2549

Merged
merged 2 commits into from
Apr 22, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 32 additions & 27 deletions aws/src/main/python/updateDependencies/lambda_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,38 @@
initscript = (('''#cloud-config
runcmd:
- echo "-------------------Updating Beam dependencies----------------------"
- sudo dpkg --configure -a
- sudo dpkg --remove --force-remove-reinstreq unattended-upgrades
- sudo apt-get install unattended-upgrades
- sudo dpkg --configure -a
- sudo apt update
- sudo apt install npm -y
- sudo apt install nodejs-legacy -y
- sudo apt install python-pip -y
- pip install --upgrade pip
- sudo pip install pandas
- sudo pip install plotly
- sudo pip install psutil requests
- sudo npm cache clean -f
- sudo npm install -g n
- sudo n stable
- sudo npm install -g npm
- sudo apt-get install curl
- curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
- sudo apt-get install nodejs -y
- sudo apt-get install docker-ce docker-ce-cli containerd.io -y
- sudo curl -L "https://github.com/docker/compose/releases/download/1.23.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
- sudo chmod +x /usr/local/bin/docker-compose
- sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
- sudo apt-get install libgtkextra-dev libgconf2-dev libnss3 libasound2 libxtst-dev -y
- sudo npm install -g [email protected] orca --unsafe-perm=true --alow-root -y
- sudo apt-get install xvfb -y
- sudo apt-get update -y
- sudo apt-get install build-essential software-properties-common -y && sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && sudo apt-get update -y
- sudo apt-get install gcc-8 g++-8 -y
- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 60 --slave /usr/bin/g++ g++ /usr/bin/g++-8
- sudo apt install jq -y
- echo "-------------------Finished updating Beam dependencies----------------------"
- cd /home/ubuntu/git/beam
- echo "send notification ..."
- /home/ubuntu/git/glip.sh -i "http://icons.iconarchive.com/icons/uiconstock/socialmedia/32/AWS-icon.png" -a "Updating Dependencies" -b "Beam automated deployment image update started on $(ec2metadata --instance-id)."
Expand Down Expand Up @@ -33,39 +65,12 @@
- ./gradlew assemble
- ./gradlew clean
- echo "preparing for python analysis"
- sudo dpkg --configure -a
- sudo dpkg --remove --force-remove-reinstreq unattended-upgrades
- sudo apt-get install unattended-upgrades
- sudo dpkg --configure -a
- sudo apt update
- sudo apt install npm -y
- sudo apt install nodejs-legacy -y
- sudo apt install python-pip -y
- pip install --upgrade pip
- sudo pip install pandas
- sudo pip install plotly
- sudo pip install psutil requests
- sudo npm cache clean -f
- sudo npm install -g n
- sudo n stable
- sudo npm install -g npm
- sudo apt-get install curl
- curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
- sudo apt-get install nodejs -y
- sudo apt-get install docker-ce docker-ce-cli containerd.io -y
- sudo curl -L "https://github.com/docker/compose/releases/download/1.23.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
- sudo chmod +x /usr/local/bin/docker-compose
- sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
- sudo apt-get install libgtkextra-dev libgconf2-dev libnss3 libasound2 libxtst-dev -y
- sudo npm install -g [email protected] orca --unsafe-perm=true --alow-root -y
- sudo apt-get install xvfb -y
- 'echo resetting git to base: "$(date)"'
- sudo git reset --hard
- 'echo fetching the latest: "$(date)"'
- sudo git fetch
- 'echo current git status: "$(date)"'
- sudo git status
- sudo apt install jq -y
- 'echo invoke create ami lambda after a 5 minute sleep to let the file system settle..."$(date)"'
- sudo sleep 5m
- sudo aws lambda invoke --invocation-type RequestResponse --function-name createAMI --region 'us-east-2' --payload '{"instance_id":"'"$(ec2metadata --instance-id)"'","region_id":"us-east-2"}' outputfile.txt
Expand Down