refactor kibana cookbook and portal cookbook