Skip to content

Create-a-Container front end webserver implentation#11

Merged
cmyers-mieweb merged 6 commits intomainfrom
cmyers_72425
Aug 11, 2025
Merged

Create-a-Container front end webserver implentation#11
cmyers-mieweb merged 6 commits intomainfrom
cmyers_72425

Conversation

@cmyers-mieweb
Copy link
Collaborator

Front end webpage for interns to use to create their containers on demand in an easy to use seamless format. Interns can also use this to view their active running containers along with their designated ports and operating system if container was created after 7/30/25

image image Screenshot 2025-07-22 084909

Carter Myers added 3 commits July 24, 2025 10:24
Commit to push the new container creator website to the repository for review.
@cmyers-mieweb cmyers-mieweb requested a review from maxklema July 31, 2025 17:49
Copy link
Contributor

@maxklema maxklema left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work. I really like this site and its ease-of-use. Just a few things to cleanup, first.

Comment on lines +39 to +43
<label for="DEPLOY_ON_START">Deploy on Start</label>
<select id="DEPLOY_ON_START" name="DEPLOY_ON_START" required>
<option value="n">No</option>
<option value="y">Yes</option>
</select>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can remove this part for now. But, we will have to expand the form later on if a user wants to automatically deploy.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed from form in latest commit

Comment on lines +18 to +22
<label for="CONTAINER_PASSWORD">Container Password</label>
<input type="password" id="CONTAINER_PASSWORD" name="CONTAINER_PASSWORD" required>

<label for="passwordConfirm">Confirm Password</label>
<input type="password" id="passwordConfirm" name="passwordConfirm" required>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we are migrating to LDAP, we will no longer need a container password field(s).

Copy link
Collaborator Author

@cmyers-mieweb cmyers-mieweb Aug 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I will probably end up doing since the password is somewhat useless, but required so we don't lock out the root user account from running pct enter CTID in the hypervisor is modify the logic behind the container creation process to generate a random 20 character password. Let me know what you think and we can proceed from there.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I will probably end up doing since the password is somewhat useless, but required so we don't lock out the root user account from running pct enter CTID in the hypervisor is modify the logic behind the container creation process to generate a random 20 character password. Let me know what you think and we can proceed from there.

I was thinking of implementing a solution like that, too. It's a good idea. We would not provide this password to the user though, correct?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont believe there to be a point, its not going to be required by the user and outputting root password in plaintext somewhat scares me. I updated the var in the create-container script file to reflect the change.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. Perhaps we can send this CONTAINER_PASSWORD into the register-container.sh (script that updates iptables and port_map.json) and create a field in port_map.json with the root password. Would that be insecure?

Comment on lines +36 to +37
<label for="OTHER_PORT">Other Port (optional, forwards TCP & UDP)</label>
<input type="number" id="OTHER_PORT" name="OTHER_PORT" placeholder="e.g., 8080">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can remove this field for now as I might re-structure it later on.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

Comment on lines +184 to +204
ssh -t root@10.15.0.4 "bash -c \"/var/lib/vz/snippets/create-container.sh \
'$CONTAINER_NAME' \
'$CONTAINER_PASSWORD' \
'$GH_ACTION' \
'$HTTP_PORT' \
'$PROXMOX_USERNAME' \
'$KEY_BASENAME' \
'$PROTOCOL_BASE_FILE' \
'$DEPLOY_ON_START' \
'${PROJECT_REPOSITORY:-}' \
'${PROJECT_BRANCH:-}' \
'${PROJECT_ROOT:-}' \
'${INSTALL_COMMAND:-}' \
'${BUILD_COMMAND:-}' \
'${START_COMMAND:-}' \
'${RUNTIME_LANGUAGE:-}' \
'${ENV_FOLDER:-}' \
'${SERVICES_FILE:-}' \
'$LINUX_DISTRIBUTION' \
'${MULTI_COMPONENT:-}' \
'${ROOT_START_COMMAND:-}' \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of these variables are not longer required to be passed in, and passing them anyway will disrupt the container creation script this calls on the hypervisor. Reference the newest container creation script in create container 'container' for the updated ssh command.

Carter Myers added 3 commits August 6, 2025 13:17
Adjusting root password to random 20 character alphanumeric with LDAP integration in place.
Copy link
Contributor

@maxklema maxklema left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and works fine. We will add/save root password in another PR.

@cmyers-mieweb cmyers-mieweb merged commit 1fcd563 into main Aug 11, 2025
@cmyers-mieweb cmyers-mieweb deleted the cmyers_72425 branch August 11, 2025 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants