teuton-software / teuton Goto Github PK
View Code? Open in Web Editor NEWInfrastructure test, mainly useful for sysadmin teachers and making contests
License: GNU General Public License v3.0
Infrastructure test, mainly useful for sysadmin teachers and making contests
License: GNU General Public License v3.0
Sometimes we dont use get/set instructions... so it's not necessary config YAML file.
When don't find file from require_relative line, it could be better show better and clear information when exception arise.
Replace task by group and
Replace target by goal
Deprecate old comando.
Sign reports generated with GPG... just to verify autenticity if needed.
Modifiy internal array data to contains group information. Then pass this values to report class to be used into output files.
Check exit code from remote command execution.
When exit_code is 0 then result.ok is true and expect_ok verify that result.ok == true
Choose same remote dir (on every platform) to send files.
Explain all result methods....
Explain output report information.
English and Spanish documentation must be put up to day.
Include information about new run DSL instruction.
Add instruction "run" into DSL. Example:
run "whoami"
This will be the same as
goto :localhost, :exec => "whoami"
New Get and set methods..
To use with host data. Example
Get_host (:debian1 ) => hash with ip username passwd hostname and protocol
Set _host (suse1, debian1) => will copy debian1 host data into suse1
When case number is less than 2... it's not good idea to show Hall of Fame.
Create something like test/test_case.rb judt to test if Case class is working as we want.
Just to run only into localhost, like a game.
like this for example:
run "whoami", :on => :host1
It's the same as
goto :host1, :exec => "whoami"
When we do something like:
goto :host1, :exec => "script.sh"
We are connecting to remote host (host1) and then trying to execute script "script.sh" located into this remote host.... but cuold we pass this file from local to remote host before executing this...
Perhaps doing (before) a file scp to remote host and then normal execution?
Well, it may be! But I'm not agree with update or change remote hosts doing this....
We'll think of it.
When I run teuton upgrade
and it fails, exit code 0 is returned, which is wrong because it has to return other than 0:
$ teuton upgrade
error: no se puede abrir .git/FETCH_HEAD: Permiso denegado
$ echo $?
0
When I execute the next command in CMD:
teuton upgrade
I've got an error:
System can not find the path specified
Looking source code I found this piece of code in lib/command/update.rb
, which causes the problem:
def upgrade
system("cd /opt/teuton && git pull")
end
In Windows, Teuton's path is C:\Program files\teuton
.
When running a non-existent verb (like teuton blabla foo
for instance) or a non-existent challenge (like teuton run as6j843df
), the error message is always the same: "[ERROR[ .rb extension required!" , which is a lot misleading. Please make Teuton distingish most error types to be able to show more according messages. Thanks!
Split Report class into: CaseReport and ResumeReport
For every hashtag into YAML config file... metaprograming could build his methods... I mean
get(:username) vs get_username
get(:host1_ip) vs get_host1_ip
I think it could be nice ;-)
Very rubistic way.
Replace use of require_relative by
use or
import
Specifically, in https://github.com/teuton-software/teuton/wiki/Create-skeleton-project is said that the command to create a skeleton project is teuton create
where in fact is teuton new
Thanks
New function that execute challenges foo but only for specified cases.
teuton info path/to/project/dir: will show brief resumed info about this challenge.
Each execution of teuton overwrites the moodle.csv
and resume.txt/.json
files, so if successive executions are carried out (skipping test cases) previous results are lost.
A possible solution would be to include the date and time of creation of those file as part of their names in (format yyyyMMddHHmmss
), for example:
moodle-20201001162700.csv
resume-20201001162700.txt
resume-20201001162700.json
If they were generated on 1st october 2020 at 16:27:00.
Detect (automaticaly) remote temp directory for every remote OS.
Specifically, in https://github.com/teuton-software/teuton/wiki/Installation-using-scripts it's said to run this command in order to install Teuton in a Linux system acting as a T-Node:
wget -qO- https://raw.githubusercontent.com/teuton-software/teuton/master/bin/linux_t-node_install.sh | bash
Which gives a 404 error.
The good link for Linux is this instead: https://raw.githubusercontent.com/teuton-software/teuton/master/install/linux/linux_t-node_install.sh
For Mac installation it's the same issue
Thanks
When I run the next command:
teuton play <challenge-folder> --export=json
I've got the next error:
C:/Program Files/teuton/lib/formatter/yaml_formatter.rb:58:in `build_history_data': undefined local variable or method `bady' for #<JSONFormatter:0x0000000005f17a20> (NameError)
Did you mean? body
from C:/Program Files/teuton/lib/formatter/yaml_formatter.rb:20:in `build_data'
from C:/Program Files/teuton/lib/formatter/json_formatter.rb:13:in `process'
from C:/Program Files/teuton/lib/report.rb:34:in `export'
from C:/Program Files/teuton/lib/case_manager/export.rb:13:in `export'
from C:/Program Files/teuton/lib/case_manager.rb:44:in `play'
from C:/Program Files/teuton/lib/case_manager/dsl.rb:11:in `play'
from D:/Users/fvarrui/Documents/GitHub/teuton-challenges/os-basic-level/users_and_groups/start.rb:40:in `<top (required)>'
from C:/Program Files/teuton/lib/project.rb:38:in `require_relative'
from C:/Program Files/teuton/lib/project.rb:38:in `play'
from C:/Program Files/teuton/lib/command/play.rb:25:in `play'
from C:/tools/ruby26/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
from C:/tools/ruby26/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
from C:/tools/ruby26/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
from C:/tools/ruby26/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/base.rb:466:in `start'
from C:/Program Files/teuton//teuton:32:in `<main>'
Create something like:
Notice and detect every different SSH error:
When we export using "colored_text" o use Rainbow to show colored texts into screen... at the end of the project script the prompt has strange look....
help instruction will show some usefull information to user when we detect that the user can't resolv the target by himself.
We need to count every attemp and when this number is higher than X we will show user this information. Example:
target "Create user david"
run "whoami"
help "Use useradd command", :attempts => 3
expect.result.equal("david")
If the user needs help to resolv the target... the score must be penalized...doesn't it?
When I run sudo rake gems
I get error in this gem.
Building native extensions. This could take a while...
ERROR: Error installing pry-byebug:
ERROR: Failed to build gem native extension.current directory: /var/lib/gems/2.5.0/gems/byebug-10.0.2/ext/byebug
/usr/bin/ruby2.5 -r ./siteconf20180926-22620-7ommdj.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.hextconf failed, exit code 1
When export report with all data about every student/case.... it could be usefull hide some data. For example:
04 (1.0/1.0)
Description : User logged
Command : last | grep oscar
Duration : 0.043 (ssh)
Alterations : count!
Expected : Not equal to 0 (String)
Result : 22 (Integer)
This output data show student all information about his target... but we could want to hide for example: command, alterations. Only the teacher will know what command has been used to verify their system.
Create DSL instructions that reads INI files. For example:
target "Checking SMB configuration"
goto :debian, :exec => "cat /etc/samba/smb.conf"
expect result.section("public").param("path").equal("/var/samba/public.d")
I've just done:
sudo dnf install ruby
gem install teuton
...an that's all: Teuton is installed correctly and run flawessly.
So this distributiont could be added to the official T-Node installation script
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.