Skip to content

Commit 51a88e0

Browse files
committed
update the pr with some chamges
1 parent 4e156d5 commit 51a88e0

8 files changed

Lines changed: 134 additions & 356 deletions

File tree

DEFAULT_CREDENTIALS.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@ This document explains the default credentials for HashiQube.
55
## Default Credentials
66

77
HashiQube comes with default credentials for easier setup:
8+
Because HashiQube was initially a Vagrant machine, the defauklt user is vagrant. In fact HashiQube can still be run as a Vagrant VM, or as a Docker container using Vagrant, and as a Dev Container using VSCode locally or Githib's Codespaces.
89

9-
- **Ubuntu User**:
10-
- Username: `ubuntu`
10+
See the Dockerfile where the vagrant user is created
11+
12+
- **Vagrant User**:
13+
- Username: `vagrant`
1114
- Password: `vagrant`
1215

1316
- **Vault**:
@@ -35,8 +38,8 @@ If you encounter SSH certificate permission issues, you can:
3538
1. Use password-based authentication with the default credentials
3639
2. Manually fix permissions with:
3740
```bash
38-
sudo chmod 600 /home/ubuntu/.ssh/id_rsa-cert.pub
39-
sudo chown ubuntu:ubuntu /home/ubuntu/.ssh/id_rsa-cert.pub
41+
sudo chmod 600 /home/vagrant/.ssh/id_rsa-cert.pub
42+
sudo chown ubuntu:ubuntu /home/vagrant/.ssh/id_rsa-cert.pub
4043
```
4144

4245
## Security Note

DEPENDENCIES.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ Continuous integration, delivery, and DevOps components:
4545
| Component | Required By | Dependencies | Notes |
4646
|-----------|-------------|--------------|-------|
4747
| jenkins | None | basetools, docker | CI/CD server |
48-
| gitlab | None | basetools, docker | Git repository manager |
48+
| gitlab | None | basetools, docker, minikube | Git repository manager |
4949
| ansible_local | None | basetools | Configuration management |
50-
| ansible-tower | None | basetools, docker | Ansible management UI |
50+
| ansible-tower | None | basetools, docker, minikube | Ansible management UI |
5151
| vscode-server | None | basetools | Code editor |
5252
| argocd | None | basetools, docker, minikube | GitOps for Kubernetes |
5353

@@ -67,6 +67,7 @@ Container management and orchestration tools:
6767

6868
| Component | Required By | Dependencies | Notes |
6969
|-----------|-------------|--------------|-------|
70+
| nomad | waypoint-nomad, fabio | basetools, docker | Local Nomad |
7071
| minikube | waypoint-kubernetes-minikube, argocd | basetools, docker | Local Kubernetes |
7172
| portainer | None | basetools, docker | Container management UI |
7273

@@ -78,7 +79,7 @@ Additional specialized components:
7879
|-----------|-------------|--------------|-------|
7980
| ldap | None | basetools, docker | Directory service |
8081
| localstack | None | basetools, docker | AWS service emulator |
81-
| apache-airflow | None | basetools, docker | Workflow management |
82+
| apache-airflow | None | basetools, docker, minikube | Workflow management |
8283
| dbt | None | basetools | Data transformation |
8384
| markdown-quiz-generator | None | basetools | Quiz generator |
8485

Dockerfile

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ RUN find /lib/systemd/system/sysinit.target.wants -mindepth 1 -not -name "system
3434
rm -f /lib/systemd/system/anaconda.target.wants/*;
3535

3636
# Enable ssh for vagrant
37-
RUN systemctl enable ssh.service;
37+
RUN systemctl enable ssh.service;
3838
EXPOSE 22
3939

4040
# Create the vagrant user
@@ -43,19 +43,13 @@ RUN useradd -m -G sudo -s /bin/bash vagrant && \
4343
echo 'vagrant ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/vagrant && \
4444
chmod 440 /etc/sudoers.d/vagrant
4545

46-
# Generate unique SSH keys for vagrant user
47-
RUN mkdir -p /home/vagrant/.ssh && \
48-
chmod 700 /home/vagrant/.ssh && \
49-
ssh-keygen -t rsa -b 4096 -f /home/vagrant/.ssh/id_rsa -N "" && \
50-
cp /home/vagrant/.ssh/id_rsa.pub /home/vagrant/.ssh/authorized_keys && \
51-
chmod 600 /home/vagrant/.ssh/authorized_keys && \
46+
# Establish ssh keys for vagrant
47+
RUN mkdir -p /home/vagrant/.ssh; \
48+
chmod 700 /home/vagrant/.ssh
49+
RUN wget -q -O /home/vagrant/.ssh/authorized_keys https://raw.githubusercontent.com/hashicorp/vagrant/master/keys/vagrant.pub
50+
RUN chmod 600 /home/vagrant/.ssh/authorized_keys; \
5251
chown -R vagrant:vagrant /home/vagrant/.ssh
5352

54-
# Store the private key in a location that can be accessed during provisioning
55-
RUN mkdir -p /vagrant/ssh_keys && \
56-
cp /home/vagrant/.ssh/id_rsa /vagrant/ssh_keys/vagrant_id_rsa && \
57-
chmod 600 /vagrant/ssh_keys/vagrant_id_rsa
58-
5953
# Run the init daemon
6054
VOLUME [ "/sys/fs/cgroup" ]
61-
CMD ["/usr/sbin/init"]
55+
CMD ["/usr/sbin/init"]

0 commit comments

Comments
 (0)