-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeployment-steps.txt
66 lines (41 loc) · 1.5 KB
/
deployment-steps.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
1. Login to AWS console.
2. Create IAM user for deployment
with specific access
1. EC2 access : It is virtual machine
2. S3 bucket: To store artifact and model in s3 bucket
3. ECR: Elastic Container registry
To save your docker image in aws
Description: About the deployment
1. Build docker image of the source code
2. Push your docker image to ECR
3. Launch Your EC2
4. Pull Your image from ECR in EC2
5. Lauch your docker image in EC2
Policy:
1. AmazonEC2ContainerRegistryFullAccess
2. AmazonEC2FullAccess
3. AmazonS3FullAccess
3.Create a s3 bukcet in ap-south-1
bucket name: scania-sensor-pipeline
4. ECR repo to store/save docker image
566373416292.dkr.ecr.ap-south-1.amazonaws.com/sensor-fault
5. EC2 machine Ubuntu Created
6. Open EC2 and Install docker in EC2 Machine
#optinal
sudo apt-get update -y
sudo apt-get upgrade
#required
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker ubuntu
newgrp docker
7. Configure EC2 as self-hosted runner
setting>actions>runner>new self hosted runner> choose os>
then run command one by one
8. Setup github secrets
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_REGION=ap-south-1
AWS_ECR_LOGIN_URI=566373416292.dkr.ecr.ap-south-1.amazonaws.com
ECR_REPOSITORY_NAME=sensor-fault
MONGO_DB_URL=mongodb+srv://avnish:Aa327030@cluster0.or68e.mongodb.net/admin?authSource=admin&replicaSet=atlas-desfdx-shard-0&w=majority&readPreference=primary&appname=MongoDB%20Compass&retryWrites=true&ssl=true