-
Notifications
You must be signed in to change notification settings - Fork 36
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
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
9775a25
Fix main script in Vagrantfile
electrocucaracha 5fc2a65
Fix gitea default admin user
electrocucaracha e656745
Use sysctl ansible module
electrocucaracha 27bfda0
Fix e2e terraform pointer
electrocucaracha 522660e
Add timeout for terraform execution
electrocucaracha 45ec481
Add Vagrant forward port instructions
electrocucaracha File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,9 @@ Vagrant.configure('2') do |config| | |
config.vm.box_check_update = false | ||
config.vm.synced_folder './', '/vagrant' | ||
|
||
config.vm.network 'forwarded_port', guest: 7007, guest_ip: '127.0.0.1', host: 7007 | ||
config.vm.network 'forwarded_port', guest: 3000, guest_ip: '172.18.0.200', host: 3000 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In general, might be a good practice to open a separate PR when adding other functionalities. |
||
|
||
# Initial setup | ||
config.vm.provision 'shell', privileged: false, inline: <<-SHELL | ||
if [ -f /etc/netplan/01-netcfg.yaml ] && ! grep -q '1.1.1.1, 8.8.8.8, 8.8.4.4' /etc/netplan/01-netcfg.yaml; then | ||
|
@@ -35,15 +38,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 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 18 additions & 20 deletions
38
e2e/provision/playbooks/roles/bootstrap/tasks/system-setup.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice, so in the vagrant case you do not need the -L in your ssh? We should document that. You will still need to do the kubectl port forwarding, unless we expose the UI on a 172.18.0.0/20 address. Which I think in general would be fine for the sandbox, even though there is no authentication on the UI in sandbox mode. I'll create a separate issue to discuss that.