-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat(compose): comelete compose prompt * fix(kuber): remove lb * feat(compose): compelete compose prompt * nothing * fix(compose): totally restructre docker compose generator * fix(compose): directory builder * fix(compose): compelete compose generation allgorithm * fix(compose): edit default values for documentation * feat(compose): add union type input for networks * fix(routes): add /api to all routes * fix(installation): fix terraform installation process and model * fix(installation): create MyBash for scripts * fix(bash): edit bi/bash * fix(docker install): fix it * feat(install): add jenkins and gitlab installation * Update unit-test.yml * fix(install): fix jenkins and gitlab
- Loading branch information
1 parent
020aef5
commit 935a2a4
Showing
33 changed files
with
532 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
|
||
sudo dnf remove -y \ | ||
docker \ | ||
docker-client \ | ||
docker-client-latest \ | ||
docker-common \ | ||
docker-latest \ | ||
docker-latest-logrotate \ | ||
docker-logrotate \ | ||
docker-engine \ | ||
podman \ | ||
runc | ||
|
||
|
||
sudo dnf -y install dnf-plugins-core | ||
sudo dnf config-manager --add-repo https://download.docker.com/linux/rhel/docker-ce.repo | ||
|
||
sudo dnf install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
sudo dnf remove -y \ | ||
docker \ | ||
docker-client \ | ||
docker-client-latest \ | ||
docker-common \ | ||
docker-latest \ | ||
docker-latest-logrotate \ | ||
docker-logrotate \ | ||
docker-engine | ||
|
||
|
||
sudo dnf -y install dnf-plugins-core | ||
sudo dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo | ||
|
||
sudo dnf -y install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
sudo dnf remove -y \ | ||
docker \ | ||
docker-client \ | ||
docker-client-latest \ | ||
docker-common \ | ||
docker-latest \ | ||
docker-latest-logrotate \ | ||
docker-logrotate \ | ||
docker-selinux \ | ||
docker-engine-selinux \ | ||
docker-engine | ||
|
||
|
||
sudo dnf -y install dnf-plugins-core | ||
sudo dnf-3 config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo | ||
|
||
|
||
sudo dnf -y install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
sudo apt-get update -y | ||
sudo apt-get install ca-certificates curl -y | ||
sudo install -m 0755 -d /etc/apt/keyrings | ||
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc | ||
sudo chmod a+r /etc/apt/keyrings/docker.asc | ||
|
||
# Add the repository to Apt sources: | ||
echo \ | ||
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \ | ||
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \ | ||
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null | ||
sudo apt-get update -y | ||
|
||
|
||
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# sudo mkdir -p /srv/gitlab | ||
# export GITLAB_HOME=/srv/gitlab | ||
|
||
version: '3.6' | ||
services: | ||
gitlab: | ||
image: gitlab/gitlab-ce:<version>-ce.0 | ||
container_name: gitlab | ||
restart: always | ||
hostname: 'gitlab.example.com' | ||
environment: | ||
GITLAB_OMNIBUS_CONFIG: | | ||
# Add any other gitlab.rb configuration here, each on its own line | ||
external_url 'https://gitlab.example.com' | ||
# you can also use custom HTTP and SSH port. if you you want to do that, follow the below syntax | ||
# external_url 'http://gitlab.example.com:8929' | ||
# gitlab_rails['gitlab_shell_ssh_port'] = 2424 | ||
ports: | ||
# - '8929:8929' # Custom HTTP Port | ||
# - '2424:22' # Custom SSH Port | ||
- '80:80' | ||
- '443:443' | ||
- '22:22' | ||
volumes: | ||
- '$GITLAB_HOME/config:/etc/gitlab' | ||
- '$GITLAB_HOME/logs:/var/log/gitlab' | ||
- '$GITLAB_HOME/data:/var/opt/gitlab' | ||
shm_size: '256m' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
sudo wget -O /etc/yum.repos.d/jenkins.repo \ | ||
https://pkg.jenkins.io/redhat-stable/jenkins.repo | ||
sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io-2023.key | ||
sudo yum upgrade -y | ||
# Add required dependencies for the jenkins package | ||
sudo yum install -y fontconfig java-17-openjdk | ||
sudo yum install -y jenkins | ||
sudo systemctl daemon-reload | ||
sudo systemctl enable --now jenkins |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
version: '3.8' | ||
services: | ||
jenkins: | ||
image: jenkins/jenkins:lts | ||
privileged: true | ||
user: root | ||
ports: | ||
- 8080:8080 | ||
- 50000:50000 | ||
container_name: jenkins | ||
volumes: | ||
- /home/${myname}/jenkins_compose/jenkins_configuration:/var/jenkins_home | ||
- /var/run/docker.sock:/var/run/docker.sock | ||
|
||
# Replace "/home/${myname}/jenkins_compose/jenkins_configuration" with the path you want to use to store your jenkins data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
sudo wget -O /etc/yum.repos.d/jenkins.repo \ | ||
https://pkg.jenkins.io/redhat-stable/jenkins.repo | ||
sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io-2023.key | ||
sudo dnf upgrade -y | ||
# Add required dependencies for the jenkins package | ||
sudo dnf install -y fontconfig java-17-openjdk | ||
sudo dnf install -y jenkins | ||
sudo systemctl daemon-reload | ||
sudo systemctl enable --now jenkins |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
sudo apt update -y | ||
sudo apt install -y fontconfig openjdk-17-jre | ||
|
||
|
||
sudo wget -O /usr/share/keyrings/jenkins-keyring.asc \ | ||
https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key | ||
echo "deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc]" \ | ||
https://pkg.jenkins.io/debian-stable binary/ | sudo tee \ | ||
/etc/apt/sources.list.d/jenkins.list > /dev/null | ||
sudo apt-get update -y | ||
sudo apt-get install -y jenkins | ||
sudo systemctl enable --now jenkins |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
|
||
|
||
sudo yum install -y yum-utils | ||
|
||
sudo yum-config-manager --add-repo https://rpm.releases.hashicorp.com/AmazonLinux/hashicorp.repo | ||
|
||
sudo yum -y install terraform |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
|
||
|
||
sudo yum install -y yum-utils | ||
|
||
sudo yum-config-manager --add-repo https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo | ||
|
||
sudo yum -y install terraform |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
|
||
|
||
sudo dnf install -y dnf-plugins-core | ||
|
||
sudo dnf config-manager --add-repo https://rpm.releases.hashicorp.com/fedora/hashicorp.repo | ||
|
||
sudo dnf -y install terraform |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
|
||
sudo apt-get update && sudo apt-get install -y gnupg software-properties-common | ||
|
||
wget -O- https://apt.releases.hashicorp.com/gpg | \ | ||
gpg --dearmor | \ | ||
sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg > /dev/null | ||
|
||
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] \ | ||
https://apt.releases.hashicorp.com $(lsb_release -cs) main" | \ | ||
sudo tee /etc/apt/sources.list.d/hashicorp.list | ||
|
||
sudo apt update | ||
|
||
sudo apt-get install terraform |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
sudo apt update -y | ||
sudo apt install -y fontconfig openjdk-17-jre | ||
|
||
|
||
sudo wget -O /usr/share/keyrings/jenkins-keyring.asc \ | ||
https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key | ||
echo "deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc]" \ | ||
https://pkg.jenkins.io/debian-stable binary/ | sudo tee \ | ||
/etc/apt/sources.list.d/jenkins.list > /dev/null | ||
sudo apt-get update -y | ||
sudo apt-get install -y jenkins | ||
sudo systemctl enable --now jenkins |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# sudo mkdir -p /srv/gitlab | ||
# export GITLAB_HOME=/srv/gitlab | ||
|
||
version: '3.6' | ||
services: | ||
gitlab: | ||
image: gitlab/gitlab-ee:<version>-ee.0 | ||
container_name: gitlab | ||
restart: always | ||
hostname: 'gitlab.example.com' | ||
environment: | ||
GITLAB_OMNIBUS_CONFIG: | | ||
# Add any other gitlab.rb configuration here, each on its own line | ||
external_url 'https://gitlab.example.com' | ||
# you can also use custom HTTP and SSH port. if you you want to do that, follow the below syntax | ||
# external_url 'http://gitlab.example.com:8929' | ||
# gitlab_rails['gitlab_shell_ssh_port'] = 2424 | ||
ports: | ||
# - '8929:8929' # Custom HTTP Port | ||
# - '2424:22' # Custom SSH Port | ||
- '80:80' | ||
- '443:443' | ||
- '22:22' | ||
volumes: | ||
- '$GITLAB_HOME/config:/etc/gitlab' | ||
- '$GITLAB_HOME/logs:/var/log/gitlab' | ||
- '$GITLAB_HOME/data:/var/opt/gitlab' | ||
shm_size: '256m' |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
from typing import Dict, List, Optional,Union | ||
from pydantic import BaseModel, model_validator,validator | ||
|
||
class DockerInstallationInput(BaseModel): | ||
os:str = "Ubuntu" | ||
environment:str = "Linux" | ||
|
||
@validator("os") | ||
def validate_os(cls, value): | ||
allowed_os = ['Ubuntu', 'Centos', 'Fedora', 'RHEL'] | ||
if value not in allowed_os: | ||
raise ValueError(f"OS must be one of {allowed_os}.") | ||
return value | ||
|
||
@validator("environment") | ||
def validate_environment(cls, value): | ||
allowed_os = ['Linux'] | ||
if value not in allowed_os: | ||
raise ValueError(f"Environment must be one of {allowed_os}.") | ||
return value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from typing import List, Optional | ||
from pydantic import BaseModel, validator, ValidationError | ||
|
||
|
||
|
||
class GitLabInstallation(BaseModel): | ||
|
||
|
||
environment:str = 'Docker' | ||
|
||
|
||
@validator("environment") | ||
def validator_environment(cls, value): | ||
env = ['Docker'] | ||
if value not in env: | ||
raise ValueError(f"your selected Environemnt must be in {env}") | ||
return value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
from typing import List, Optional | ||
from pydantic import BaseModel, validator, ValidationError | ||
|
||
|
||
|
||
class JenkinsInstallation(BaseModel): | ||
|
||
os: str = 'Ubuntu' | ||
|
||
environment:str = 'Linux' | ||
|
||
@validator("os") | ||
def validator_os(cls, value): | ||
valid_oss = ['Ubuntu','Fedora','RHEL'] | ||
if value not in valid_oss: | ||
raise ValueError(f"your selected OS must be in {valid_oss}") | ||
return value | ||
|
||
@validator("environment") | ||
def validator_environment(cls, value): | ||
env = ['Linux','Docker'] | ||
if value not in env: | ||
raise ValueError(f"your selected Environemnt must be in {env}") | ||
return value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.