Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable devcontainers #87

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 13 additions & 0 deletions .devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"image": "mcr.microsoft.com/vscode/devcontainers/base:ubuntu-20.04",
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:1": {},
"ghcr.io/devcontainers/features/sshd:1": {}
},
"hostRequirements": {
"cpus": 8,
"memory": "16gb"
},
"postCreateCommand": "cd e2e/provision/; ./install_sandbox.sh | tee ~/install_sandbox.log",
"forwardPorts": [7007, 3000]
}
1 change: 1 addition & 0 deletions e2e/provision/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Quick Start for GCE and VMs running in other environments
[![Create a Sandbox in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://github.com/codespaces/new?repo=nephio-project/test-infra)

Moved to the docs repository:
* [Install
Expand Down
2 changes: 1 addition & 1 deletion e2e/provision/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Vagrant.configure('2') do |config|
%i[virtualbox libvirt].each do |provider|
config.vm.provider provider do |p|
p.cpus = ENV['CPUS'] || 8
p.memory = ENV['MEMORY'] || 32 * 1024
p.memory = ENV['MEMORY'] || 16 * 1024
end
end

Expand Down
3 changes: 3 additions & 0 deletions e2e/provision/install_sandbox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ if [ "${DEPLOYMENT_TYPE:-r1}" == "one-summit" ]; then
done
popd >/dev/null
else
if [ "${CODESPACE_NAME-}" ] && ! grep -q "ansible_port: 2222" ~/nephio.yaml; then
echo " ansible_port: 2222" >> ~/nephio.yaml
fi
# Management cluster creation
if [[ ${DEBUG:-false} != "true" ]]; then
ansible-playbook -i ./nephio.yaml playbooks/cluster.yml
Expand Down
2 changes: 1 addition & 1 deletion e2e/provision/nephio.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ all:
host_os: "linux" # use "darwin" for MacOS X, "windows" for Windows
host_arch: "amd64" # other possible values: "386","arm64","arm","ppc64le","s390x"
host_min_vcpu: 8 # minimum required vCPUs before install
host_min_cpu_ram: 16 # minimum required CPU RAM before install; value in GB
host_min_cpu_ram: 8 # minimum required CPU RAM before install; value in GB
host_min_root_disk_space: 50 # minimum required disk space before install; value in GB
tmp_directory: "/tmp"
bin_directory: "/usr/local/bin"
Expand Down
4 changes: 3 additions & 1 deletion e2e/provision/playbooks/cluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
name: kubernetes==26.1.0
- name: Install Docker Engine
become: true
when: (container_engine is not defined) or (container_engine == "docker")
when:
- ( container_engine is not defined ) or ( container_engine == "docker" )
- not lookup('ansible.builtin.env', 'CODESPACE_NAME')
block:
- name: Install docker binaries
ansible.builtin.include_role:
Expand Down
2 changes: 1 addition & 1 deletion e2e/provision/playbooks/roles/bootstrap/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
##############################################################################

host_min_vcpu: 8 # minimum required vCPUs before install
host_min_cpu_ram: 16 # minimum required CPU RAM before install; value in GB
host_min_cpu_ram: 8 # minimum required CPU RAM before install; value in GB
host_min_root_disk_space: 50 # minimum required disk space before install; value in GB

container_engine: docker
Expand Down