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

SaaS Deployement Fixes & Copyright fix #71

Merged
merged 2 commits into from
May 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified VMManagementPortalAPI.war
Binary file not shown.
44 changes: 29 additions & 15 deletions build.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,25 +191,39 @@ async function createSaaSFiles() {
"\n" +
'CMD [ "--max_connections=1000000" ]';
const portal_api_docker_file_data =
`FROM mcr.microsoft.com/powershell:latest

# Install PowerCLI
RUN pwsh -Command "Install-Module -Name VMware.PowerCLI -Force -AllowClobber"

# Install default JDK and Apache Tomcat
RUN apt-get update && apt-get install -y default-jdk wget && \
wget https://archive.apache.org/dist/tomcat/tomcat-8/v8.5.70/bin/apache-tomcat-8.5.70.tar.gz && \
tar -xvf apache-tomcat-8.5.70.tar.gz && \
mv apache-tomcat-8.5.70 /opt/tomcat && \
rm -rf apache-tomcat-8.5.70.tar.gz

` +
`FROM mcr.microsoft.com/powershell:latest` +
"\n" +
`# Install PowerCLI` +
"\n" +
`RUN pwsh -Command "Install-Module -Name VMware.PowerCLI -Force -AllowClobber"` +
"\n" +
`# Install default JDK and Apache Tomcat` +
"\n" +
`RUN apt-get update && apt-get install -y default-jdk wget && \\` +
"\n" +
`wget https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.59/bin/apache-tomcat-9.0.59.tar.gz && \\` +
"\n" +
`tar -xvf apache-tomcat-9.0.59.tar.gz && \\` +
"\n" +
`mv apache-tomcat-9.0.59 /opt/tomcat && \\` +
"\n" +
`rm -rf apache-tomcat-9.0.59.tar.gz ` +
"\n" +
"\n" +
"COPY files/VMManagementPortalAPI.war /opt/tomcat/webapps/ " +
"\n" +
"COPY files/wait-for-it.sh /opt/tomcat/bin/ ";
"COPY files/wait-for-it.sh /opt/tomcat/bin/ " +
"\n" +
"\n" +
"RUN chmod 777 /opt/tomcat/bin/wait-for-it.sh" +
"\n" +
"\n" +
`RUN pwsh -Command "Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Confirm:\\$false"` +
"\n" +
`RUN pwsh -Command "Set-PowerCLIConfiguration -WebOperationTimeoutSeconds -1 -Confirm:\\$false"`;

const docker_compose =
'version: \'3.7\'\n\nservices:\n ui:\n image: portal_ui:1.0\n ports:\n - "3000:3000"\n environment:\n LOG_LEVEL: \'info\'\n APIBASE: http://api:8080/VMManagementPortalAPI\n networks:\n - portal_net\n volumes:\n - logs:/app/server/logs\n depends_on:\n - "api"\n\n api:\n image: portal_api:1.0\n ports:\n - "8080"\n environment:\n JAVA_OPTS : -Xmx1024m -Xms1024m \n DB_NAME : vmportal02\n DB_USER : alex\n DB_PASSWORD : Full@ccess123\n DB_SERVER: db\n DB_USE_SSL: "false"\n networks:\n - portal_net\n depends_on:\n - "db"\n command: ["/opt/tomcat/bin/wait-for-it.sh", "db:3306","-t","300", "--", "/opt/tomcat/bin/catalina.sh", "run"]\n \n db:\n image: portal_db:1.0\n ports:\n - "3306"\n networks:\n - portal_net\n volumes:\n - ./data/db:/var/lib/mysql\nnetworks:\n portal_net:\n driver: bridge\n\nvolumes:\n logs:\n ';
'version: \'3.7\'\n\nservices:\n ui:\n image: portal_ui:1.0\n restart: always\n ports:\n - "3000:3000"\n environment:\n LOG_LEVEL: \'info\'\n APIBASE: http://api:8080/VMManagementPortalAPI\n networks:\n - portal_net\n volumes:\n - logs:/app/server/logs\n\n api:\n image: portal_api:1.0\n restart: always\n ports:\n - "8080:8080"\n environment:\n JAVA_OPTS : -Xmx1024m -Xms1024m \n DB_NAME : vmportal02\n DB_USER : alex\n DB_PASSWORD : Full@ccess123\n DB_SERVER: db\n DB_USE_SSL: "false"\n networks:\n - portal_net\n command: ["/opt/tomcat/bin/wait-for-it.sh", "db:3306","-t","3000", "--", "/opt/tomcat/bin/catalina.sh", "run"]\n \n db:\n image: portal_db:1.0\n restart: always\n ports:\n - "3306:3306"\n networks:\n - portal_net\n volumes:\n - ./data/mysql:/var/lib/mysql\nnetworks:\n portal_net:\n driver: bridge\n\nvolumes:\n logs:\n ';
createFile("./build/docker/saas/portal-ui", "Dockerfile", docker_file_data);
createFile(
"./build/docker/saas/portal-db",
Expand Down
2 changes: 1 addition & 1 deletion portaldb.sql
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ CREATE TABLE IF NOT EXISTS `vmportal02`.`vm` (
`vm_os` VARCHAR(255) NOT NULL ,
`vm_os_ver` VARCHAR(255) NOT NULL ,
`vm_owner` VARCHAR(255) NOT NULL DEFAULT '' ,
`vm_comment` VARCHAR(255) NOT NULL DEFAULT '' ,
`vm_comment` MEDIUMTEXT NULL DEFAULT NULL,
`vm_group` VARCHAR(255) NOT NULL DEFAULT '' ,
`is_available` TINYINT(1) NOT NULL DEFAULT '1' ,
`snapshot_count` INT(11) NOT NULL DEFAULT '0' ,
Expand Down
67 changes: 67 additions & 0 deletions server/api/lists.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,5 +185,72 @@ module.exports = {
text: "Production",
},
],
vmapcomponents: [
{
value: "UI",
text: "User Interface",
},
{
value: "SNAPSHOTS",
text: "Snapshots Module",
},
{
value: "SSHTOOL",
text: "SSH Tools Module",
},
{
value: "API",
text: "Backend API",
},
{
value: "DYNAMICOBJECTAPPLICATION",
text: "More Application Module",
},
{
value: "SPA",
text: "Single Page Application Module",
},
],
defecttype: [
{
value: "DEFECT",
text: "Defect",
},
{
value: "NEWREQUEST",
text: "New Request",
},
],

defectstatus: [
{
value: "RESOLVED",
text: "Resolved",
},
{
value: "NEW",
text: "New",
},
{
value: "INPROG",
text: "In Progress",
},
{
value: "PLANNING",
text: "Planning",
},
{
value: "PENDING",
text: "Pending",
},
{
value: "CLOSED",
text: "Closed",
},
{
value: "REOPENED",
text: "Reopened",
},
],
},
};
4 changes: 3 additions & 1 deletion src/app/public/widget/footer/footer.component.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@

<!-- Footer -->
<footer class="card-footer fixed-bottom"><div><p>
Made with ❤ by <a href="https://in.linkedin.com/in/soumya-prasad-rana-5a7a6b70 ">Soumya</a> </p></div></footer>
<!--Made with ❤ by <a href="https://in.linkedin.com/in/soumya-prasad-rana-5a7a6b70 ">Soumya</a>-->
VM Assignment Portal 2.0.4 © 2023 All rights reserved.
</p></div></footer>