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

Use sysctl Ansible module #60

Merged
merged 6 commits into from
Jun 5, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions e2e/provision/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ Vagrant.configure('2') do |config|
config.vm.provision 'shell', privileged: false do |sh|
sh.env = {
DEBUG: ENV.fetch('DEBUG', true),
DEPLOYMENT_TYPE: ENV.fetch('DEPLOYMENT_TYPE', 'cluster-api')
DEPLOYMENT_TYPE: ENV.fetch('DEPLOYMENT_TYPE', 'r1')
}
sh.inline = <<-SHELL
set -o errexit
set -o pipefail

cd /vagrant/
cp nephio.yaml ~/nephio.yaml
./gce_run.sh | tee ~/gce_run.log
./gce_install_sandbox.sh | tee ~/gce_install_sandbox.log
SHELL
end

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 @@ -18,5 +18,5 @@ kubernetes_version: v1.27.1
gitea_postgres_password: c2VjcmV0 # echo -n "secret" | base64
gitea_db_password: c2VjcmV0

gitea_username: admin
gitea_username: nephio
johnbelamaric marked this conversation as resolved.
Show resolved Hide resolved
gitea_password: secret
38 changes: 18 additions & 20 deletions e2e/provision/playbooks/roles/bootstrap/tasks/system-setup.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
## © 2023 Nephio Authors
## Licensed under the Apache License 2.0
## SPDX-License-Identifier: Apache-2.0
---
- name: systctl config
become: true
lineinfile:
path: /etc/sysctl.conf
line: "{{ item }}"
with_items:
- fs.inotify.max_user_watches=524288
- fs.inotify.max_user_instances=512
- kernel.keys.maxkeys=500000
- kernel.keys.maxbytes=1000000
# SPDX-license-identifier: Apache-2.0
##############################################################################
# Copyright (c) 2023 The Nephio Authors.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################

- name: systctl config
- name: Set kernel parameters
become: true
shell: "{{ item }}"
with_items:
- sysctl fs.inotify.max_user_watches=524288
- sysctl fs.inotify.max_user_instances=512
- sysctl kernel.keys.maxkeys=500000
- sysctl kernel.keys.maxbytes=1000000
ansible.posix.sysctl:
name: "{{ item.name }}"
value: "{{ item.value }}"
state: present
loop:
- {name: fs.inotify.max_user_watches, value: 524288}
- {name: fs.inotify.max_user_instances, value: 512}
- {name: kernel.keys.maxkeys, value: 500000 }
- {name: kernel.keys.maxbytes, value: 1000000}
4 changes: 2 additions & 2 deletions e2e/terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ resource "google_compute_instance" "vm_instance" {
}
inline = [
"cd provision/",
"chmod +x gce_run.sh",
"DEBUG=true DEPLOYMENT_TYPE=cluster-api ./gce_run.sh"
"chmod +x gce_install_sandbox.sh",
"DEBUG=true DEPLOYMENT_TYPE=r1 ./gce_install_sandbox.sh"
]
}

Expand Down