Amazon Linux 2: rpm vs yum: installed package list differs
Amazon Linux 2: has anyone made a list of good add-on packages?
What’s the purpose of the machine? Gaming rig? Dev box? Web server? Bastion host? The answer to that will dictate what you install on the machine. What’s a good add on package for me (the entirety of emacs) may not be for you.
Just install the stuff you need, on an as you need basis. Then script it so you can make it repeatable! Use ansible or salt or plain ol bash scripts.
But since you insist: I generally install vim, git, tmux, wget, gcc, ntp, docker, zsh, make, mlocate, php, python, ruby, go, virtualenv, pip, strace, dtrace.
More on reddit.comAmazon Linux 2
Run Packages Installation Commands on Amazon Linux 2 using EB Extensions - Stack Overflow
Enhanced developer productivity
Amazon Linux 2 is offered as a virtual machine and container image for on-premises development and testing. Developers can speed up their application development by building, testing, and integrating on the same Linux distribution that is used in their production environment.
Optimized performance
Amazon Linux 2 includes support for the latest Amazon Elastic Compute Cloud (Amazon EC2) instance capabilities and is tuned for enhanced performance. It includes packages that help ease integration with other AWS services.
Peace of mind with long-term support
Amazon Linux 2 offers long-term support. Developers, IT administrators, and ISVs get the predictability and stability of a long-term support (LTS) release, but without compromising access to the latest versions of popular software packages.
the commands i did are rpm -list and yum -qa -qf "%{name}.%{arch}\n" with some post processing (mostly in awk, but it would easy to do in just about any language) to merge split lines that yum does. and extract the installed packages vs. the available packages into separate files. rpm reports an extra package that yum does not report. that package is gpg-pubkey.(none). i am wondering why the difference. maybe yum won't list installed packages that are not in the repository and this package is not?
i was building (what was to be) a quick script to gather package info for study so i could make decisions on what additional packages i would include in my own base AMIs for a spectrum of projects (some new, some to be upgraded). here is a copy what that script ended up like.
i am curious if anyone has made a list of suggested add-on packages to install? i might want to use such a list as a starting point to add packages i know i use and go from there, to set up a base AMI for a variety of instances. i am also curious if there is a smaller list targeting the Minimal edition of Amazon Linux 2 (i use this, too, for small/lean stuff).
What’s the purpose of the machine? Gaming rig? Dev box? Web server? Bastion host? The answer to that will dictate what you install on the machine. What’s a good add on package for me (the entirety of emacs) may not be for you.
Just install the stuff you need, on an as you need basis. Then script it so you can make it repeatable! Use ansible or salt or plain ol bash scripts.
But since you insist: I generally install vim, git, tmux, wget, gcc, ntp, docker, zsh, make, mlocate, php, python, ruby, go, virtualenv, pip, strace, dtrace.
Moved on to ubuntu
are there any significant differences between Amazon Linux 2 and CentOS? I know amazon Linux 2 is built on CentOS and I am told has better networking performance but are the same packages available, does systemctl function the same are any pitfalls that I should be aware of?
I tried to replicate the issue on EB with Amazon Linux 2, but your commands worked perfectly fine. I used Python platform, not .NET, but since both are based on AL2 I don't see why would they be different in this aspect.
To troubleshoot, you can ssh into your EB instance, or download EB logs from console and inspect /var/log/cfn-init-cmd.log. It should have details regarding install_gdi.config execution.
For comparision, I attach my output:
2020-08-30 05:34:52,631 P3617 [INFO] Command 01_install_gdi
2020-08-30 05:35:08,423 P3617 [INFO] -----------------------Command Output-----------------------
2020-08-30 05:35:08,423 P3617 [INFO] Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
2020-08-30 05:35:08,423 P3617 [INFO] http://csc.mcs.sdsmt.edu/epel/7/x86_64/repodata/0e811d5e2eb547161695f97c2fb8c2eaa0ccfe0ba7125321404db90dab5af5b3-updateinfo.xml.bz2: [Errno 12] Timeout on http://csc.mcs.sdsmt.edu/epel/7/x86_64/repodata/0e811d5e2eb547161695f97c2fb8c2eaa0ccfe0ba7125321404db90dab5af5b3-updateinfo.xml.bz2: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 5 seconds')
2020-08-30 05:35:08,423 P3617 [INFO] Trying other mirror.
2020-08-30 05:35:08,423 P3617 [INFO] 200 packages excluded due to repository priority protections
2020-08-30 05:35:08,423 P3617 [INFO] Resolving Dependencies
2020-08-30 05:35:08,424 P3617 [INFO] --> Running transaction check
2020-08-30 05:35:08,424 P3617 [INFO] ---> Package libgdiplus.x86_64 0:2.10-10.el7 will be installed
2020-08-30 05:35:08,424 P3617 [INFO] --> Processing Dependency: libXrender.so.1()(64bit) for package: libgdiplus-2.10-10.el7.x86_64
2020-08-30 05:35:08,424 P3617 [INFO] --> Processing Dependency: libcairo.so.2()(64bit) for package: libgdiplus-2.10-10.el7.x86_64
2020-08-30 05:35:08,424 P3617 [INFO] --> Processing Dependency: libexif.so.12()(64bit) for package: libgdiplus-2.10-10.el7.x86_64
2020-08-30 05:35:08,424 P3617 [INFO] --> Processing Dependency: libgif.so.4()(64bit) for package: libgdiplus-2.10-10.el7.x86_64
#
# more logs
#
2020-08-30 05:35:08,433 P3617 [INFO]
2020-08-30 05:35:08,433 P3617 [INFO] Installed:
2020-08-30 05:35:08,434 P3617 [INFO] libgdiplus.x86_64 0:2.10-10.el7
2020-08-30 05:35:08,434 P3617 [INFO]
#
# more logs
#
2020-08-30 05:35:08,435 P3617 [INFO] Complete!
2020-08-30 05:35:08,435 P3617 [INFO] ------------------------------------------------------------
2020-08-30 05:35:08,435 P3617 [INFO] Completed successfully.
The problem was with my buildspec.yml file.
It used to look like this and it didn't include .ebxtensions folder into the publish artifact folder:
version: 0.2
phases:
build:
commands:
- dotnet publish WebApi.csproj -c Release
artifacts:
files:
- bin/Release/netcoreapp3.1/publish/*
discard-paths: yes
I changed it to look like this and it works now:
version: 0.2
phases:
build:
commands:
- dotnet publish WebApi.csproj -c Release
artifacts:
files:
- '**/*'
base-directory: bin/Release/netcoreapp3.1/publish