https://github.com/bjcode-git/projetcloud
https://github.com/bjcode-git/projetcloud
Last synced: 7 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/bjcode-git/projetcloud
- Owner: BJCode-git
- Created: 2024-05-14T09:09:07.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-14T20:18:39.000Z (over 1 year ago)
- Last Synced: 2025-04-06T20:38:02.320Z (7 months ago)
- Language: HCL
- Size: 554 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ProjetCloud
# Mettre à jour l'image du front-end
```bash
git clone https://gitlab.unistra.fr/jbrelot/projetcloud -b front-end
```
*** Opérer les modifications nécessaires ***
```bash
docker build ./ --tag projetcloud/front-end
docker tag projetcloud/front-end docker.io/jbunistras/cloud-front-end
docker push docker.io/jbunistras/cloud-front-end
```
# Mettre à jour l'image du back-end
```bash
git clone https://gitlab.unistra.fr/jbrelot/projetcloud -b front-end
```
### Opérer les modifications nécessaires
```bash
docker build ./ --tag projetcloud/front-end
docker tag projetcloud/front-end docker.io/jbunistras/cloud-front-end
docker push docker.io/jbunistras/cloud-front-end
```
Normalement, les images sont maintenues à jour sur le dockerhub
via un job gitlab qui se déclenche à chaque push sur la branche front-end ou back-end
# Configuration de l'accès aux machines et configuration de l'ip flottante
```bash
echo "
Host bastion-cloud
Hostname bastion.100do.se
User student
Host racaillou
Hostname racaillou.internal.100do.se
User ubuntu
ProxyJump bastion-cloud
Host gravalanch
Hostname gravalanch.internal.100do.se
User ubuntu
ProxyJump bastion-cloud
Host grolem
Hostname grolem.internal.100do.se
User ubuntu
ProxyJump bastion-cloud
" >> ~/.ssh/config
echo "
-----BEGIN-----
CLE SSH
-----END-----
" >> ~/.ssh/cloud_key
chmod 600 ~/.ssh/cloud_key
ssh-add ~/.ssh/cloud_key
```
# Configuration de l'ip flottante
```bash
ssh racaillou
sudo ip address add dev vxlan12 172.16.12.110/24
exit
ssh gravalanch
sudo ip address add dev vxlan12 172.16.12.110/24
exit
ssh grolem
sudo ip address add dev vxlan12 172.16.12.110/24
exit
ssh gravalanch
sudo ip address add dev vxlan12 172.16.12.110/24
exit
```
# Deploiement de l'application
```bash
ssh racaillou
echo "
-----BEGIN-----
CLE SSH
-----END-----
" >> ~/.ssh/cloud_key
chmod 600 ~/.ssh/cloud_key
ssh-add ~/.ssh/cloud_key
git clone https://gitlab.unistra.fr/jbrelot/projetcloud
sh install-ansible.sh
ansible-playbook -i ansible/inventory.yaml ansible/playbook.yaml
```