Comments (5)
Hello @knoxilla
To be honest i'm not developing a generic solution for this problem, because i'm not patient enough to add this feature. I copy the existing template and deleted/changed all those sections i don't want to use for amazonlinux2.
I had this problem for so long, so the script under Userdata should be debugged line by line on an EC2 with empty amzlinux2.
As far as i remember the first issue is with the yum can't install the epel-release, because you first have to run some costum command, which the yum install -y epel-release
will return.
But I realised that you don't have to install the epel-release, you can simply run yum install -y python2-pip
if you want pip2, but you have natively installed pip3 and awscli on amazonlinux2.
So if you want to use amazonlinux2 only, you should rewrite the userdata of the template.
Change all these lines: https://github.com/aws-quickstart/quickstart-linux-bastion/blob/master/templates/linux-bastion.template#L569-L585 to
pip3 install awscli --upgrade
from quickstart-linux-bastion.
I tweaked the cfn template enough to allow me to deploy the stack using an amzn2 AMI, and things seemed to work OK at first glance. I just did some quick hacks by adding an AMI choice in us-east-1 a la
...
AMZNLINUX2HVM: amzn2-ami-hvm-x86_64-gp2
...
AMZNLINUX2HVM: ami-0b69ea66ff7391e80
...
As I said, it deployed and an instance came up in the ASG and allowed me to connect. Yay!
But the cfn-init
failed and bastion.log & CloudWatch logging (among other things, I'm sure) are not happening.
I was hoping I could help push this along but clearly there is more involved beyond my knowledge. I now you are working on v2, and you have my thanks for that!
In case it does help, here is what was logged in /var/log/cloud-init-output.log
when things went boom:
+ cfn-init -v --stack linux-bastion --resource BastionLaunchConfiguration --region us-east-1
Traceback (most recent call last):
File "/usr/bin/cfn-init", line 4, in <module>
__import__('pkg_resources').run_script('aws-cfn-bootstrap==1.4', 'cfn-init')
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 750, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1518, in run_script
.format(**locals()),
pkg_resources.ResolutionError: Script 'scripts/cfn-init' not found in metadata at None
+ cfn-signal -e 1 --stack linux-bastion --resource BastionAutoScalingGroup --region us-east-1
Traceback (most recent call last):
File "/usr/bin/cfn-signal", line 4, in <module>
__import__('pkg_resources').run_script('aws-cfn-bootstrap==1.4', 'cfn-signal')
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 750, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1518, in run_script
.format(**locals()),
pkg_resources.ResolutionError: Script 'scripts/cfn-signal' not found in metadata at None
Sep 25 17:01:31 cloud-init[3424]: util.py[WARNING]: Failed running /var/lib/cloud/instance/scripts/part-001 [1]
Sep 25 17:01:31 cloud-init[3424]: cc_scripts_user.py[WARNING]: Failed to run module scripts-user (scripts in /var/lib/cloud/instance/scripts)
Sep 25 17:01:31 cloud-init[3424]: util.py[WARNING]: Running module scripts-user (<module 'cloudinit.config.cc_scripts_user' from '/usr/lib/python2.7/site-packages/cloudin
Cloud-init v. 18.2-72.amzn2.0.7 finished at Wed, 25 Sep 2019 17:01:31 +0000. Datasource DataSourceEc2. Up 36.45 seconds
from quickstart-linux-bastion.
Thanks much. I will give it a go - thanks for the pointers and recap of things you'ave already figured out. Cheers,
-t
from quickstart-linux-bastion.
+1
I am trying to get psql client v10 installed, to connect to a psql 10 RDS instance. It should be wicked easy to get 10 installed on amazon linux 2, and I fear staying on the older version of amazon linux, since support already seems to be dwindling.
from quickstart-linux-bastion.
Added in
quickstart-linux-bastion/templates/linux-bastion.template
Lines 241 to 379 in 34ffdce
from quickstart-linux-bastion.
Related Issues (20)
- It would be good to make the secondary subnet optional HOT 2
- Unable to Deploy Template in Oregon HOT 1
- Bastion deployment fails due to issue with bootstrap script HOT 2
- Unable to satisfy 100% MinSuccessfulInstancesPercent requirement HOT 1
- Spot Support for Bastion Host ASG / Inexpensive Training and Enablement Setups
- Make SSM Session Manager Access the Default HOT 3
- Missing Support for ap-southeast-3 Jakarta Region
- Parameter to put ssm-user in /etc/sudoers.d/ssm-users HOT 1
- Bastion Host Initialization and Script Abort on Stack Updates HOT 1
- Advanced Template Parameter 'BastionBootstrapScript' needs a much better description HOT 1
- 'BastionBootstrapScript' is failing with initial deployment, but works when done as stack update HOT 2
- Deployment guide feedback HOT 1
- Add support for latest cfn-tools release HOT 1
- Deprecated templates files were removed
- Error occurred during deploy in the cn-northwest-1 and cn-north-1 region HOT 4
- Install fails when Allowed bastion external access CIDR parameter is set to RFC 1918 CIDR HOT 1
- Unable to deploy using existing VPC with IPv6 Support
- Non public bastion
- Allow gp3 volume type
- Deployment guide feedback HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from quickstart-linux-bastion.