Skip to content

Commit 3e3b5c8

Browse files
Add mkcert notes and comprehensive changelog
Co-authored-by: prasadtalasila <9206466+prasadtalasila@users.noreply.github.com>
1 parent fa1e287 commit 3e3b5c8

File tree

3 files changed

+147
-0
lines changed

3 files changed

+147
-0
lines changed

deploy/vagrant/CHANGELOG.md

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
# Vagrant Installation Changes
2+
3+
## Summary
4+
5+
This document describes the updates made to the vagrant installation scripts and configuration based on improvements from issue #962.
6+
7+
## Key Changes
8+
9+
### 1. Node.js Installation via NVM
10+
11+
**Previous**: Direct installation of Node.js v20.10 via nodesource repository
12+
13+
**Current**: Node.js v22.x installed via nvm (Node Version Manager)
14+
15+
**Benefits**:
16+
- Easy version switching
17+
- Better isolation of Node.js versions
18+
- Consistent with development scripts in `script/` directory
19+
- Allows users to manage multiple Node.js versions
20+
21+
**Files Updated**:
22+
- `deploy/vagrant/make_boxes/dtaas/user.sh`
23+
24+
### 2. Docker Compose Plugin
25+
26+
**Previous**: Standalone docker-compose v2.20 installation
27+
28+
**Current**: Docker compose plugin (docker-compose-plugin) installed with Docker
29+
30+
**Benefits**:
31+
- Official Docker recommended approach
32+
- Uses `docker compose` command instead of `docker-compose`
33+
- Automatically updated with Docker
34+
- Better integration with Docker CLI
35+
36+
**Files Updated**:
37+
- `deploy/vagrant/make_boxes/dtaas/developer.sh`
38+
39+
### 3. Python Virtual Environment
40+
41+
**Previous**: System-wide pip installations
42+
43+
**Current**: Python packages installed in virtual environment (venv)
44+
45+
**Benefits**:
46+
- Isolated Python environment
47+
- No conflicts with system packages
48+
- Consistent with development scripts
49+
- Better dependency management
50+
51+
**Files Updated**:
52+
- `deploy/vagrant/make_boxes/dtaas/developer.sh`
53+
54+
### 4. Updated Docker Image Versions
55+
56+
Updated to match versions in `deploy/docker` and `deploy/services`:
57+
58+
| Image | Previous Version | Current Version |
59+
|-------|-----------------|-----------------|
60+
| grafana | 10.1.4 | 11.5.2-ubuntu |
61+
| rabbitmq | 3-management | 4.0.7-management |
62+
| mongodb | 7.0.3 | 8.0.3 |
63+
| gitlab-ce | 16.4.1-ce.0 | 17.9.2-ce.0 |
64+
| gitlab-runner | N/A | alpine-v17.5.3 |
65+
66+
**Files Updated**:
67+
- `deploy/vagrant/make_boxes/dtaas/user.sh`
68+
- `deploy/vagrant/make_boxes/dtaas/developer.sh`
69+
70+
### 5. Vagrantfile Templates
71+
72+
**New**: Created reusable Vagrantfile templates in `deploy/vagrant/templates/`
73+
74+
**Templates**:
75+
- `Vagrantfile.make-box.template` - For creating the base DTaaS box
76+
- `Vagrantfile.single-machine.template` - For single machine deployment
77+
- `Vagrantfile.two-machine.template` - For two machine deployment
78+
- `boxes.json.template` - Configuration for two-machine setup
79+
80+
**Benefits**:
81+
- Easier customization
82+
- Clear separation of configuration
83+
- Documented customization points
84+
- Version control friendly
85+
86+
### 6. Documentation Updates
87+
88+
All README files updated with:
89+
- Current software versions
90+
- Template usage instructions
91+
- Clearer setup steps
92+
- Note about mkcert as openssl alternative
93+
94+
**Files Updated**:
95+
- `deploy/vagrant/make_boxes/dtaas/README.md`
96+
- `deploy/vagrant/single-machine/README.md`
97+
- `deploy/vagrant/two-machine/README.md`
98+
99+
### 7. Additional Tools
100+
101+
Added tools to align with development scripts:
102+
- `pm2` - Process manager for Node.js
103+
- `madge` - Dependency graph generator
104+
- `shellcheck` - Shell script linter
105+
106+
## Migration Guide
107+
108+
### For Existing Deployments
109+
110+
1. **Node.js**: Existing installations will continue to work. For new deployments, nvm will be used.
111+
112+
2. **Docker Compose**: Update your commands:
113+
- Old: `docker-compose up`
114+
- New: `docker compose up`
115+
116+
3. **Python Packages**: For developers, activate the venv:
117+
```bash
118+
source ~/dtaas-venv/bin/activate
119+
```
120+
121+
### For New Deployments
122+
123+
1. Use the templates in `deploy/vagrant/templates/`
124+
2. Follow the updated README instructions
125+
3. All new features are automatically included
126+
127+
## Certificate Generation Note
128+
129+
While openssl remains installed for backward compatibility, consider using [mkcert](https://github.com/FiloSottile/mkcert) for local development certificates. mkcert provides:
130+
- Automatic trusted certificate installation
131+
- Simpler workflow
132+
- Better browser compatibility
133+
134+
## Compatibility
135+
136+
- Base OS: Ubuntu 22.04 LTS (Jammy)
137+
- Vagrant: Compatible with existing Vagrant installations
138+
- VirtualBox: No changes required
139+
- All changes are backward compatible for existing boxes

deploy/vagrant/make_boxes/dtaas/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,12 @@ vagrant box add --name dtaas ./dtaas.vagrant
105105
#config.vm.box = "dtaas"
106106
```
107107

108+
## Certificate Generation
109+
110+
For development purposes, you may want to generate SSL/TLS certificates.
111+
While openssl is installed by default, consider using [mkcert](https://github.com/FiloSottile/mkcert)
112+
as an alternative for easier local development certificate management.
113+
108114
## TODO
109115

110116
1. Write a script for automating the above steps

deploy/vagrant/make_boxes/dtaas/developer.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ apt-get upgrade -y
88
# docker-compose is now installed as docker compose plugin via docker-compose-plugin package in user.sh
99

1010
# Install openssl for certificate generation
11+
# Note: Consider using mkcert as an alternative for local development certificates
12+
# mkcert can be installed from: https://github.com/FiloSottile/mkcert
1113
apt-get install -y wget openssl
1214

1315
# Install playwright tool for integration tests on browsers

0 commit comments

Comments
 (0)