mirror of
https://github.com/ZwareBear/JFrog-Cloud-Installers.git
synced 2026-01-21 05:06:56 -06:00
Remove all unnecessary steps in user scripts
This commit is contained in:
@@ -329,17 +329,9 @@ Resources:
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
S3URI=${QsS3Uri}
|
# Install jq
|
||||||
|
yum install -y epel-release
|
||||||
# Update OS
|
yum install -y jq
|
||||||
yum update -y
|
|
||||||
|
|
||||||
# Install git
|
|
||||||
yum install -y epel-release git policycoreutils-python
|
|
||||||
|
|
||||||
yum update --security -y 2>&1 | tee /var/log/userdata.yum_security_update.log
|
|
||||||
|
|
||||||
yum install -y jq python3 libselinux-python3
|
|
||||||
|
|
||||||
echo $PATH
|
echo $PATH
|
||||||
|
|
||||||
@@ -347,24 +339,9 @@ Resources:
|
|||||||
|
|
||||||
echo $PATH
|
echo $PATH
|
||||||
|
|
||||||
# Create virtual env and activate
|
# Activate virtual env
|
||||||
python3 -m venv ~/venv --system-site-packages
|
|
||||||
source ~/venv/bin/activate
|
source ~/venv/bin/activate
|
||||||
|
|
||||||
pip install --upgrade pip
|
|
||||||
pip install jmespath wheel
|
|
||||||
|
|
||||||
# Install Cloudformation helper scripts
|
|
||||||
pip install https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-py3-latest.tar.gz 2>&1 | tee /var/log/userdata.aws_cfn_bootstrap_install.log
|
|
||||||
|
|
||||||
pip install awscli 2>&1 | tee /var/log/userdata.awscli_install.log
|
|
||||||
|
|
||||||
pip install ansible 2>&1 | tee /var/log/userdata.ansible_install.log
|
|
||||||
|
|
||||||
mkdir ~/.jfrog_ami
|
|
||||||
|
|
||||||
aws s3 --region ${AWS::Region} sync s3://${QsS3BucketName}/${QsS3KeyPrefix}cloudInstallerScripts/ ~/.jfrog_ami/ || cfn_fail
|
|
||||||
|
|
||||||
setsebool httpd_can_network_connect 1 -P
|
setsebool httpd_can_network_connect 1 -P
|
||||||
|
|
||||||
# CentOS cloned virtual machines do not create a new machine id
|
# CentOS cloned virtual machines do not create a new machine id
|
||||||
@@ -381,8 +358,6 @@ Resources:
|
|||||||
|
|
||||||
/root/attach_volume.sh || cfn_fail
|
/root/attach_volume.sh || cfn_fail
|
||||||
|
|
||||||
ansible-galaxy collection install community.general ansible.posix
|
|
||||||
|
|
||||||
setsebool httpd_can_network_connect 1 -P
|
setsebool httpd_can_network_connect 1 -P
|
||||||
|
|
||||||
aws secretsmanager get-secret-value --secret-id ${ArtifactoryLicensesSecretName} --region ${AWS::Region} | jq -r '{"artifactory_licenses":(.SecretString | fromjson )}' > ~/.jfrog_ami/licenses.json || cfn_fail
|
aws secretsmanager get-secret-value --secret-id ${ArtifactoryLicensesSecretName} --region ${AWS::Region} | jq -r '{"artifactory_licenses":(.SecretString | fromjson )}' > ~/.jfrog_ami/licenses.json || cfn_fail
|
||||||
|
|||||||
@@ -228,31 +228,9 @@ Resources:
|
|||||||
|
|
||||||
echo $PATH
|
echo $PATH
|
||||||
|
|
||||||
# Create virtual env and activate
|
# Activate virtual env
|
||||||
python3 -m venv ~/venv --system-site-packages
|
|
||||||
source ~/venv/bin/activate
|
source ~/venv/bin/activate
|
||||||
|
|
||||||
pip install --upgrade pip
|
|
||||||
pip install wheel
|
|
||||||
|
|
||||||
S3URI=${QsS3Uri}
|
|
||||||
|
|
||||||
yum update --security -y &> /var/log/userdata.yum_security_update.log
|
|
||||||
|
|
||||||
yum install -y git python3 libselinux-python3
|
|
||||||
yum install -y postgresql-server postgresql-devel
|
|
||||||
|
|
||||||
# Install Cloudformation helper scripts
|
|
||||||
pip install https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-py3-latest.tar.gz 2>&1 | tee /var/log/userdata.aws_cfn_bootstrap_install.log
|
|
||||||
|
|
||||||
pip install awscli &> /var/log/userdata.awscli_install.log
|
|
||||||
|
|
||||||
pip install ansible &> /var/log/userdata.ansible_install.log
|
|
||||||
|
|
||||||
mkdir ~/.xray_ami
|
|
||||||
|
|
||||||
aws s3 --region ${AWS::Region} sync s3://${QsS3BucketName}/${QsS3KeyPrefix}cloudInstallerScripts/ ~/.xray_ami/
|
|
||||||
|
|
||||||
setsebool httpd_can_network_connect 1 -P
|
setsebool httpd_can_network_connect 1 -P
|
||||||
|
|
||||||
# CentOS cloned virtual machines do not create a new machine id
|
# CentOS cloned virtual machines do not create a new machine id
|
||||||
@@ -269,8 +247,6 @@ Resources:
|
|||||||
|
|
||||||
lsblk # debug
|
lsblk # debug
|
||||||
|
|
||||||
ansible-galaxy collection install community.general ansible.posix
|
|
||||||
|
|
||||||
ansible-playbook /root/.xray_ami/xray.yml --vault-id /root/.vault_pass.txt 2>&1 | tee /var/log/xray.log || cfn_fail
|
ansible-playbook /root/.xray_ami/xray.yml --vault-id /root/.vault_pass.txt 2>&1 | tee /var/log/xray.log || cfn_fail
|
||||||
|
|
||||||
rm -rf /root/.secureit.sh
|
rm -rf /root/.secureit.sh
|
||||||
|
|||||||
Reference in New Issue
Block a user