-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a49e8c7
commit de975d2
Showing
4 changed files
with
83 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<component name="ProjectRunConfigurationManager"> | ||
<configuration default="false" name="Execute_main" type="PythonConfigurationType" factoryName="Python"> | ||
<module name="DevOps-Jenkins-Shellscripting" /> | ||
<option name="ENV_FILES" value="" /> | ||
<option name="INTERPRETER_OPTIONS" value="" /> | ||
<option name="PARENT_ENVS" value="true" /> | ||
<envs> | ||
<env name="PYTHONUNBUFFERED" value="1" /> | ||
<env name="ENV" value="local" /> | ||
</envs> | ||
<option name="SDK_HOME" value="" /> | ||
<option name="SDK_NAME" value="Python 3.10 (KF_EnvOrchestatorTool)" /> | ||
<option name="WORKING_DIRECTORY" value="D:\Data\ProjectsData\Programming\Projects\Web\_Devops\KF_EnvOrchestatorTool\src\local\main" /> | ||
<option name="IS_MODULE_SDK" value="false" /> | ||
<option name="ADD_CONTENT_ROOTS" value="true" /> | ||
<option name="ADD_SOURCE_ROOTS" value="true" /> | ||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" /> | ||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/src/local/main/main.py" /> | ||
<option name="PARAMETERS" value="" /> | ||
<option name="SHOW_COMMAND_LINE" value="false" /> | ||
<option name="EMULATE_TERMINAL" value="false" /> | ||
<option name="MODULE_MODE" value="false" /> | ||
<option name="REDIRECT_INPUT" value="false" /> | ||
<option name="INPUT_FILE" value="" /> | ||
<method v="2" /> | ||
</configuration> | ||
</component> |
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 |
---|---|---|
|
@@ -9,16 +9,19 @@ This tool is used to serve an automated environment in local or cloud platform t | |
- [Local installation](#local-installation) | ||
- [Configure Jenkins](#configure-jenkins) | ||
- [Configure Environment Variables to execute main.py](#configure-environment-variables-to-execute-mainpy) | ||
- [Configure SSH](#configure-ssh) | ||
- [AWS Configuration](#aws-configuration) | ||
- [Trigger Terraform pipeline](#trigger-terraform-pipeline) | ||
- [Connect to EC2 instance](#connect-to-ec2-instance) | ||
- [Configuration](#configuration) | ||
- [Dependencies](#dependencies) | ||
- [Tech stacks CI/CD](#tech-stacks-ci/cd) | ||
- [Tips](#tips) | ||
- [Troubleshoting](#troubleshoting) | ||
- [Jenkins](#jenkins) | ||
- [Scripts](#scripts) | ||
- [AWS](#aws) | ||
- [Settings](#settings) | ||
|
||
# Systems | ||
|
||
|
@@ -56,6 +59,23 @@ JENKINS_PASS=<YOUR_JENKINS_PASSWORD> | |
ACCESS_TOKEN=<YOUR_GITHUB_ACCESS_TOKEN> | ||
``` | ||
|
||
### Configure SSH | ||
|
||
- Install OpenSSH Server on your local machine. | ||
- Start the service. | ||
|
||
```bash | ||
# Windows | ||
Start-Service sshd | ||
``` | ||
|
||
- (Optional) Try to connect from container to your local machine with SSH. | ||
|
||
```bash | ||
docker exec -it jenkins-git bash | ||
ssh -i /var/jenkins_home/.ssh/id_rsa [email protected] -vvv | ||
``` | ||
|
||
## AWS Configuration | ||
|
||
Implantation of Jenkins automated with Terraform on AWS. | ||
|
@@ -175,6 +195,11 @@ docker push kolmanfreecss/jenkins-git | |
- Shellscript | ||
- Terraform | ||
|
||
# Tips | ||
|
||
- Check Event Viewer on Windows to see if SSH Server is running properly. | ||
- `Applications and Services Logs > OpenSSH > Operational` | ||
|
||
# Troubleshoting | ||
|
||
## Jenkins | ||
|
@@ -223,6 +248,29 @@ docker push kolmanfreecss/jenkins-git | |
- Remove permissions to other group users or another users because AWS won't let you connect to the EC2 instance if | ||
the permissions are too permissive. | ||
## Settings | ||
- Install SSH Server on local machine. | ||
- If you have a Windows Server you can follow Microsoft official documentation to install OpenSSH Server. Or check https://github.com/PowerShell/Win32-OpenSSH/releases | ||
- Also you could use WSL to install OpenSSH Server. | ||
- ```bash | ||
sudo apt-get install openssh-server | ||
``` | ||
- Configure permissions to the id_rsa file to not be too permissive. | ||
- ```bash | ||
chmod 600 /var/jenkins_home/.ssh/id_rsa | ||
``` | ||
- Create an authorized_keys file in the .ssh folder with the public key of the local machine. | ||
- ```bash | ||
cat /var/jenkins_home/.ssh/id_rsa.pub >> /var/jenkins_home/.ssh/authorized_keys | ||
``` | ||
- Create an sshd_config file in the .ssh folder with the following IMPORTANT configurations UNCCOMMENTED.: | ||
- ```bash | ||
Port 22 | ||
AuthorizedKeysFile /var/jenkins_home/.ssh/authorized_keys | ||
PubkeyAuthentication yes | ||
PasswordAuthentication no | ||
``` | ||
--- | ||
Shield: [![CC-BY-NC-ND 4.0][CC-BY-NC-ND-shield]][CC-BY-NC-ND] | ||
|
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