File tree Expand file tree Collapse file tree 6 files changed +72
-5
lines changed Expand file tree Collapse file tree 6 files changed +72
-5
lines changed Original file line number Diff line number Diff line change 77 - " *.md"
88 - " windows/**"
99 - " libvirt/**"
10+ - " unix/prechecks/**"
1011
1112jobs :
1213 ubuntu :
4748 runs-on : ubuntu-latest
4849 strategy :
4950 matrix :
50- python-version : [ '3.6' ]
51+ python-version : [ '3.6', '3.8', '3.9' ]
5152 env :
5253 AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID }}
5354 AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ variable current_branch_name {
3535
3636
3737source "amazon-ebs" "rhel8" {
38- ami_name = " machine-stats-prechecls-rhel8"
38+ ami_name = " machine-stats-prechecls-rhel8-python- ${ var . packer_python_version } "
3939 instance_type = " t2.micro"
4040 region = " ${ var . aws_region } "
4141 access_key = " ${ var . aws_access_key } "
@@ -51,8 +51,9 @@ source "amazon-ebs" "rhel8" {
5151 owners = [" 309956199498" ]
5252 }
5353 ssh_username = " ec2-user"
54- force_deregister = true
55- force_delete_snapshot = true
54+ force_deregister = true
55+ force_delete_snapshot = true
56+ skip_save_build_region = true
5657}
5758
5859
Original file line number Diff line number Diff line change 11#! /bin/bash
22set -x
33
4- echo ++ Install Python36
4+ echo ++ Install Python3.6 and pip
55sudo yum install -y python36
66sudo pip3 install --upgrade pip
77
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ set -x
3+
4+ echo ++ Install required dependencies
5+ sudo yum install -y gcc openssl-devel bzip2-devel libffi-devel zlib-devel xz-devel
6+
7+ echo ++ Install Python3.8
8+ cd /opt
9+ sudo curl -O https://www.python.org/ftp/python/3.8.12/Python-3.8.12.tgz && sudo tar xzf Python-3.8.12.tgz
10+
11+ # echo ++ Updating PATH
12+ export PATH=/usr/local/bin:$PATH
13+
14+ cd Python-3.8.12
15+ sudo ./configure --enable-optimizations
16+ sudo make altinstall
17+
18+ # ### Check installed python versions ##
19+ # sudo ls /usr/local/bin/python*
20+
21+ echo ++ Install pipenv
22+ pip3.8 install pipenv
23+
24+ echo ++ Check packaging
25+ cd /home/ec2-user/machine_stats/unix
26+ pipenv install --python /usr/local/bin/python3.8
27+
28+ echo ++ Run machine stats
29+ pipenv run machine-stats -h
30+
31+ echo ++++ DONE ++++
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ set -x
3+
4+ echo ++ Install required dependencies
5+ sudo yum install -y gcc openssl-devel bzip2-devel libffi-devel zlib-devel xz-devel
6+
7+ echo ++ Install Python3.9
8+ cd /opt
9+ sudo curl -O https://www.python.org/ftp/python/3.9.6/Python-3.9.6.tgz && sudo tar xzf Python-3.9.6.tgz
10+
11+ # echo ++ Updating PATH
12+ export PATH=/usr/local/bin:$PATH
13+
14+ cd Python-3.9.6
15+ sudo ./configure --enable-optimizations
16+ sudo make altinstall
17+
18+ # ### Check installed python versions ##
19+ # sudo ls /usr/local/bin/python*
20+
21+ echo ++ Install pipenv
22+ pip3.9 install pipenv
23+
24+ echo ++ Check packaging
25+ cd /home/ec2-user/machine_stats/unix
26+ pipenv install --python /usr/local/bin/python3.9
27+
28+ echo ++ Run machine stats
29+ pipenv run machine-stats -h
30+
31+ echo ++++ DONE ++++
Original file line number Diff line number Diff line change @@ -7,6 +7,9 @@ sudo yum -y update
77echo ++ Install git
88sudo yum install -y git
99
10+ echo ++ Install required dependencies
11+ sudo yum groupinstall -y ' Development Tools'
12+
1013echo ++ Clone machine stats repo
1114git clone https://github.com/tidalmigrations/machine_stats.git /home/ec2-user/machine_stats
1215cd /home/ec2-user/machine_stats
You can’t perform that action at this time.
0 commit comments