You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+54-21Lines changed: 54 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,18 +49,27 @@ Before you begin, ensure you have the following:
49
49
50
50
-**Prisma Cloud Defender Agent Deployed on K8s Cluster:** The Prisma Cloud Defender agent should be deployed on your Kubernetes cluster and connected to the Prisma Cloud tenant. This ensures that Prisma Cloud can monitor and protect your deployed applications.
51
51
52
-
## Step-by-Step Procedure
52
+
- Create your own GitHub Organization
53
+
1. Go to [GitHub](https://github.com/).
54
+
1. In the upper-right corner of any page on GitHub, click your profile photo, then click Settings.
55
+
1. In the "Access" section of the sidebar, click Organizations.
56
+
1. Next to the "Organizations" header, click New organization.
57
+
53
58
54
-
### Fork this Repository
59
+
##Step-by-Step Procedure
55
60
56
-
Click the "Fork" button in the top-right corner to create your own copy of the repository.
61
+
### Download the code source
62
+
63
+
Go to the repository: https://github.com/PaloAltoNetworks/code2cloud-python-flask-webserver.
64
+
Download the code in ZIP format
65
+

57
66
58
-
### Enable Workflows for the Forked Repository
67
+
### Create a new repository in your organization
59
68
60
-
- Go to https://github.com/<your-github-username>/code2cloud-python-flask-webserver/actions/
61
-
- Click on `Enable Workflows` button
69
+
Make sure to select your organization as the owner of the new repository:
70
+

62
71
63
-
### Onboard the Forked Repository in Prisma Cloud
72
+
### Onboard the New Repository in Prisma Cloud
64
73
65
74
Follow the instructions in the Prisma Cloud documentation to connect your GitHub repository:
66
75
[Add GitHub Repository to Prisma Cloud](https://docs.prismacloud.io/en/classic/appsec-admin-guide/get-started/connect-your-repositories/code-repositories/add-github)
@@ -69,13 +78,15 @@ Follow the instructions in the Prisma Cloud documentation to connect your GitHub
69
78
70
79
Clone your forked repository to your local machine:
Unzip the code source to a new directory on your local machine.
87
+
Change the directory and open repository:
77
88
78
-
```console
89
+
```bash
79
90
cd code2cloud-python-flask-webserver
80
91
```
81
92
@@ -86,17 +97,22 @@ version = "0.0.10" # Update to a new version number
86
97
87
98
Open the `manifests/deployment.yaml` file and update the container repository name and the version number:
88
99
```yaml
89
-
image: ghcr.io/<your-github-username>/code2cloud-python-flask-webserver:v0.0.10 # Update the ontainer repository name with your github username and the version number
100
+
image: ghcr.io/<your-github-organization>/code2cloud-python-flask-webserver:v0.0.10 # Update the ontainer repository name with your github username and the version number
90
101
```
91
102
92
-
### Push the changes to the Repository
93
-
103
+
Initializes a git repository, commits your code, creates the main branch, sets up a remote repository on GitHub, and pushes your code to it.
@@ -130,8 +146,25 @@ Verify the service is created and accessible:
130
146
kubectl get svc -n code2cloud
131
147
```
132
148
133
-
### Access the Application
149
+
### Access the Web Application
134
150
Use the external IP provided by the LoadBalancer service to access the application in your browser.
135
151
136
-
## Conclusion
137
-
By following these steps, you have successfully demonstrated the code-to-cloud traceability feature of Prisma Cloud using a Python Flask application. The application is now deployed on a Kubernetes cluster, showcasing automated CI/CD with GitHub Actions and Docker.
152
+

153
+
154
+
### Troubleshooting by verifying the HASH
155
+
156
+
Go to https://github.com/<your-github-organization>/code2cloud-python-flask-webserver/actions/
157
+
Click on latest action and expand the Output image digest step as you can see below:
158
+

159
+
160
+
Go to home page of you repository and click on the Packages: https://github.com/<your-github-organization>/code2cloud-python-flask-webserver
161
+

162
+
163
+
Expand the latest version to verify the digest from the previous step:
164
+

165
+
166
+
Connect to your Prisma Cloud tenant and search for code2cloud from Runtime Security > Monitor > Vulnerabilities > Images > Deployed, click on the image that was deployed on your kubernetes cluster and verify the hash from previous step:
167
+

Copy file name to clipboardExpand all lines: manifests/deployment.yaml
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ spec:
25
25
spec:
26
26
containers:
27
27
- name: code2cloud-python-flask-webserver
28
-
image: ghcr.io/<your-github-username>/code2cloud-python-flask-webserver:v0.0.9 # Update the repo container repository name with your github username and the version number
28
+
image: ghcr.io/<your-github-organization>/code2cloud-python-flask-webserver:v0.0.9 # Update the repo container repository name with your github username and the version number
0 commit comments