Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[US] Dockerize PostGOAT #182

Closed
6 tasks done
Alexicazana opened this issue Jan 10, 2024 · 9 comments · Fixed by #205
Closed
6 tasks done

[US] Dockerize PostGOAT #182

Alexicazana opened this issue Jan 10, 2024 · 9 comments · Fixed by #205
Assignees
Labels
Core Group of US with integrations or core features Infrastructure/Tooling/User Management Group of US regarding the infrastructure, tooling, and user management Iteration 7 --> Iteration 8 User story from Iteration 7, moved to Iteration 8 Iteration 8 --> Iteration 9 User Story from Iteration 8, moved to Iteration 9 Priority: High Stakeholder signed-off The user story is completed and has been signed off by the stakeholder Type: User Story Description of a feature from the end user perspective of a software system

Comments

@Alexicazana
Copy link
Collaborator

Alexicazana commented Jan 10, 2024

MoSCoW Risk Story Points
Must High 13

Acceptance Criteria

Risks

  • Requires reorganization of part of the stack's architecture (microservice-adjacent ish)
  • Need to have solid understanding of Docker - creating an image to publish on Dockerhub and to be used by others (fault-free)
  • Can be hard to define the expected behaviour since we are not yet super clear on the other moving parts (eg Postgoat website documentation and deployment, containerizing the application so that an application configurator may use it appropriately; how does an app configurator truly expect to use the platform?)

Pre-requisites

  • Meet with the stakeholder to clarify the requirements
  • Understand the types of users that will be involved - define their roles, what permissions do they have?
  • Read Dockerization documentation (see links below) to ensure proper creation and deployment (risk of having to fix this later can have heavy consequences)

Tasks

  • Read Docker docs about dockerizing a full stack app (https://milanwittpohl.com/projects/tutorials/Full-Stack-Web-App/dockerizing-our-front-and-backend)
  • Create Dockerfile to define dependencies, base image, and any necessary configurations
  • Create a self-contained docker image that has the front end deployed on it as well as all the required tooling (.sh scripts, and volume access to the "usecases") (created from dockerfile that uses an official base image + everything else needed)
@Alexicazana Alexicazana added the Type: User Story Description of a feature from the end user perspective of a software system label Jan 10, 2024
@Alexicazana Alexicazana added this to the Iteration 7 milestone Jan 10, 2024
@Alexicazana Alexicazana self-assigned this Jan 10, 2024
@Alexicazana Alexicazana added the Infrastructure/Tooling/User Management Group of US regarding the infrastructure, tooling, and user management label Jan 12, 2024
@Alexicazana
Copy link
Collaborator Author

Technically, the new dockerfile should be correctly written, but there is a lot of confusion relating to the way the new dockerfile should overlap with the existing dockerfile for the other three services using containers. The dockerfile as is should technically live in the root of the application platform, but there's a bit of confusion with the compose.yml file... The other issue is that we have to copy the services existing on the development side for the application configurators, which raises a few concerns for me/creates a bit of messiness.

Note that I had a couple of issues relating to the other containers, which need to be replicated for the application configurator.

TLDR; I'm still figuring out how I should package this new docker service so that I can publish it to Dockerhub and then just churn out use cases by using this custom image. In the meantime, here's the dockerfile as is, so that there's at least some sense of progress visible:

Screenshot 2024-01-12 at 9 23 37 PM

@Alexicazana
Copy link
Collaborator Author

Second compose.yml with the new postgoat service added:

Screenshot 2024-01-12 at 9 24 25 PM

This needs additional integration and testing, as well as a better understanding on how to implement alongside existing compose.yml (existing containers).

@Alexicazana
Copy link
Collaborator Author

Last minute changes made to existing containers, need to resolve and account for this in new compose.yml for the new service

Screenshot 2024-01-12 at 9 27 46 PM

@witnick witnick added the Iteration 7 --> Iteration 8 User story from Iteration 7, moved to Iteration 8 label Jan 13, 2024
@Alexicazana
Copy link
Collaborator Author

Updates:

Working on a couple of fixes; here's a few breadcrumbs relating to the issues I am having:
moby/buildkit#4305
docker/buildx#1079

^Most recent update (4 days ago) on the issue...

@Alexicazana
Copy link
Collaborator Author

On the other hand, after almost two days of debugging, I finally managed to run a build to create JS out of all of our TS/TSX files locally! :D
Screenshot 2024-01-23 at 11 26 56 PM

This was the first step, because the image I have to create needs to be able to do this in a container, so it was necessary to get this working locally first.

@Alexicazana
Copy link
Collaborator Author

MAJOR UPDATES!

  • The build files get created successfully, allowing the static web page to eventually be deployed using the minified js files inside of a folder called /build

Screenshot 2024-01-26 at 12 25 19 AM

  • I finally managed to successfully create the image container:
    Screenshot 2024-01-25 at 11 49 32 PM

  • Got the container running!
    Screenshot 2024-01-26 at 12 19 02 AM

Only issue is that it seems that the content of the web page is not displaying when I open localhost:8080 (it does however open correctly):
Screenshot 2024-01-26 at 12 18 55 AM

@Alexicazana Alexicazana linked a pull request Jan 26, 2024 that will close this issue
@lyubageorgieva lyubageorgieva removed a link to a pull request Jan 26, 2024
@Alexicazana Alexicazana changed the title [US] Dockerize PostGOAT & Deploy to Dockerhub [US] Dockerize PostGOAT Jan 26, 2024
@Alexicazana Alexicazana linked a pull request Jan 26, 2024 that will close this issue
@lyubageorgieva lyubageorgieva added Needs stakeholder sign-off The user story is completed in terms of the tasks but it needs the stakeholder's signoff to be close Priority: High Core Group of US with integrations or core features labels Jan 30, 2024
@lyubageorgieva
Copy link
Collaborator

This US is pushed to Iteration 9, since we are missing the demo video, as our Stakeholder requested to keep doing the videos for sign-off.

@lyubageorgieva lyubageorgieva added the Iteration 8 --> Iteration 9 User Story from Iteration 8, moved to Iteration 9 label Feb 2, 2024
@TheOrangeDuke
Copy link
Collaborator

Looks good! Signing off!

@TheOrangeDuke TheOrangeDuke added Stakeholder signed-off The user story is completed and has been signed off by the stakeholder and removed Needs stakeholder sign-off The user story is completed in terms of the tasks but it needs the stakeholder's signoff to be close labels Feb 10, 2024
@Alexicazana
Copy link
Collaborator Author

Included original software architecture diagram I had done for this story:

081e2bcc-4efa-45d4-8a75-50fb2bdcbf14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core Group of US with integrations or core features Infrastructure/Tooling/User Management Group of US regarding the infrastructure, tooling, and user management Iteration 7 --> Iteration 8 User story from Iteration 7, moved to Iteration 8 Iteration 8 --> Iteration 9 User Story from Iteration 8, moved to Iteration 9 Priority: High Stakeholder signed-off The user story is completed and has been signed off by the stakeholder Type: User Story Description of a feature from the end user perspective of a software system
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants